Moving a SceneNode around

oracle1124

19-12-2007 07:42:44

Hi all,

I just got a quick question, when I create a Scene with one floor, 2 SceneNodes that are stationary and one SceneNode that moves. Do I have to move the SceneNode from within OgreNewt or can I do it directly from Ogre and OgreNewt will pick up the movement?

I am just having a problem with my moving SceneNode not interacting with the stationary SceneNodes but it does initially with the floor.

Thanks,

oracle

albino

19-12-2007 09:19:16

you have to add a newton body to the scene node with collision data
and then move the body
ogrenewt will then handle moving the scene node too

oracle1124

19-12-2007 09:37:46

Yeah I did kinda found that out after I sent in the message... I just gotta work up the courage to rewrite my code now lol

PS for those who want to know, I moved my movable SceneNode and 'fired' some other nodes across the point where I started and viola! I was moving again, albeit not the way I wanted to!

oracle1124

26-12-2007 10:35:20

you have to add a newton body to the scene node with collision data
and then move the body
ogrenewt will then handle moving the scene node too


And what is the best way of moving the body? I know there is PositionOrientation or something, but the docs only recommend this for the initial position.

albino

26-12-2007 13:34:15

add/set force or add/set velocity for linear movement and for rotating
add/set torque or add/set omega

Tubez

26-12-2007 15:36:11

If you do anything else than adding forces and torques you break dynamics. Depending on your application, this might be OK, or it might be a total faux-pas.

albino

27-12-2007 12:41:31

how would you move a body around then?

for sure it aint moving without forces/velocity

Tubez

27-12-2007 21:57:04

Re-read what I typed. You might find a clue.