scenenode attributes

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

scenenode attributes

Post by schick »

It would be great if every irr::scene::ISceneNode has its own velocity attribute. In my opinion it quite useful eg. you have some animators, and everyone needs to know that the scenenode is falling (only on animator has to set the parameter using collision detection) the remaining animators take the attribute and play a sound "ahhh", do some crazy movement to the mesh or whatever. Also a rotation attribute is useful the same way i just mentioned,

schick
qwe
Posts: 112
Joined: Sun Dec 28, 2003 12:54 am
Location: Oregon, USA

Post by qwe »

play a sound "ahhh"? I think you mean play a sound "AAIIIAIAIIIIIIGGGGHHHHH!" :D


anyway, a rotation attribute already exists. ISceneNode*->getRotation. It returns the relative rotation as a vector3df.

http://irrlicht.sourceforge.net/docu/cl ... e.html#a28
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

"relative rotation as a vector3df. "

im still not quite sure what this means.

is it the same as the 'forward' or 'facing' vector?

if not, how do you create one using the getRotation() vector?

currently, I am using this to do so:
irr::core::vector3df facing( sin( faerienode->getRotation().Y * PI/180.0f ), 0, cos( faerienode->getRotation().Y * PI/180.0f ) );

but that only gives me the X-Z rotation (which is fine for now). what would I do when I need the true XYZ facing?
a screen cap is worth 0x100000 DWORDS
Post Reply