Hi, I'm trying tose wade.iso.createObject to create an isometric object on the isometric map that I loaded from a .wsc file. I passed it a sprite (that renders correctly if I instead use 'new SceneObject' and 'wade.addSceneObject') in the objectData and let it default the gridCoords to 0,0. However, it won't render in the scene, even though a SceneObject containing the sprite is returned. I did not use the don'tAddToScene parameter. What might be going wrong?
Nevermind, I figured it out when I found an old tutorial for isometric objects from Wade 1.0.
I misread the documentation. I thought the sprites parameter of objectData was asking for Sprite objects themselves (like how the SceneObject constructor takes a Sprite object). But in reality the sprites parameter is asking for spriteData, like the Sprite constructor takes.
I wish this had been clearer in the documentation -- I misreasoned by analogy with the SceneObject constructor, probably because the parameter is called 'sprites' and because wade.iso.createObject returns a SceneObject
You are right, it's a bit confusing and it's changing in the next version of WADE. Not just the documentation, but the way you create isometric objects.
We will maintain backward-compatibility, i.e. any code that you write now will still work with WADE 4. However in the future you'll also be able to simply create SceneObjects that have a flag to say that they live in the isometric world. You won't need to call wade.iso.createObject.
That sounds amazing! I look forward to it.
when source code exeqate in machine code then create the objet class.