sorry for my n00b question but thats what this forum is for right..?
so my question is:
is it possible to move a scene node relative to its rotation?
e.g. moving a node 3 units forward, not along the x/y/z axis, but the direction the node is facing
because when i use setPosition() i can only specify world coordinates...
and one more quick question
apparently there is no function that returns the mouse movement during the last frame... so i should probably write it myself storing the mouses coordinates every frame and subtracting the new coordinates... do i have to use position2d or vector2d for storing them?
Relative movement of a scene node
What do you mean "direction the node is facing", if it's a cube, where does it face?
X = left / right
Y = up / down
Z = forward / backward
to take the node 3 units ahead, use:
3 units up:
and so on with the X axis.
==================
for you second question, i guess it's position2d.
X = left / right
Y = up / down
Z = forward / backward
Code: Select all
node->setPosition(vector3df(X, Y, Z))
Code: Select all
node->setPosition(node->getPosition+vector3df(0,0,3))
Code: Select all
node->setPosition(node->getPosition+vector3df(0,3,0))
==================
for you second question, i guess it's position2d.
i found answer to my first question here: http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=25424
thanks anyway
thanks anyway