getAbsolutePosition() does not seem to work for ITerrainSceneNode

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
n00bc0de
Posts: 85
Joined: Tue Oct 04, 2022 1:21 am

getAbsolutePosition() does not seem to work for ITerrainSceneNode

Post by n00bc0de »

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.
CuteAlien
Admin
Posts: 9838
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: getAbsolutePosition() does not seem to work for ITerrainSceneNode

Post by CuteAlien »

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.
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
n00bc0de
Posts: 85
Joined: Tue Oct 04, 2022 1:21 am

Re: getAbsolutePosition() does not seem to work for ITerrainSceneNode

Post by n00bc0de »

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.
Post Reply