getAbsolutePosition() does not seem to work for ITerrainSceneNode
getAbsolutePosition() does not seem to work for ITerrainSceneNode
I have a function that translates a scene node based on its current position which works for everything but when I call getAbsolutePosition() for ITerrainSceneNodes it always returns a vector of (0,0,0). The node can be moved with setPosition() so its weird that this happens. Is this happening for anybody else or is it just me.
Re: getAbsolutePosition() does not seem to work for ITerrainSceneNode
Yeah, that node works rather different from the rest. Not sure why. Either someone just wrote a wrapper around some terrain code to have it in Irrlicht, or there are some reasons for which one has to dig into the code a bit more. I haven't invested much time looking into that one so far.
Somehow it has an internal struct STerrainData which is instanced only once in this node and contains Position and Rotation instead of using those of the node. Therefore a bunch of other stuff doesn't work.
I suppose one could try just getting rid of that struct, moving other variables into the class directly and then see what happens. But needs then some tests if collisions and all it's functions still work.
If someone experiments with it I'm fine applying patches. But I'm unlikely to find time for this myself currently as I got already other half-finished stuff around from last year.
Somehow it has an internal struct STerrainData which is instanced only once in this node and contains Position and Rotation instead of using those of the node. Therefore a bunch of other stuff doesn't work.
I suppose one could try just getting rid of that struct, moving other variables into the class directly and then see what happens. But needs then some tests if collisions and all it's functions still work.
If someone experiments with it I'm fine applying patches. But I'm unlikely to find time for this myself currently as I got already other half-finished stuff around from last year.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: getAbsolutePosition() does not seem to work for ITerrainSceneNode
I probably won't be able look at it myself for about 6 weeks. I have to travel for work.
I did a simple workaround for now where I just created my own wrapper over the ITerrainSceneNode.
I did a simple workaround for now where I just created my own wrapper over the ITerrainSceneNode.