animated x and absolute pos

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
kimgar
Posts: 37
Joined: Fri Apr 13, 2007 2:53 pm
Location: norway

animated x and absolute pos

Post by kimgar »

i have a mesh animated on a circular spline with path constrain. exported to .X and imported in irr, all animates fine, but how do i get the absolute position of the mesh?

Image

my code:

Code: Select all

irr::core::aabbox3df bBox = node->getTransformedBoundingBox();
irr::core::matrix4 m = node->getAbsoluteTransformation();
return bBox.getCenter(); // always returns 0,10,0
return m.getTranslation(); // always returns 0,0,0
i've been struggling with this bugger for hours now, all searches ends up in getTransformedBoundingBox() or getAbsoluteTransformation(), but i just can't make it happen. - please help!
i've done this before in blitz, but now trying to learn c++ and irr1.4beta some things are just falling apart...
sader
Posts: 28
Joined: Sat Sep 29, 2007 1:38 pm

Post by sader »

doesn't getPoisition work for you?

vector3df pos = node->getPosition();
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

An animated mesh animates "in position", so the absolute position (nor the position) will change. It's just the vertices which are animated. You might succeed in querying animated joints, which are easily accessible during animation.
kimgar
Posts: 37
Joined: Fri Apr 13, 2007 2:53 pm
Location: norway

Post by kimgar »

oh god, ofcourse! it's amazing how fast things slip out memory :)
i knew i had done it before, i just couldn't remember the bone issue - works like a charm now! thanks for the reminder!
Post Reply