[SOLVED] 0.9-34: Nodes of static bodies stay at the origin

Night Elf

27-08-2007 22:05:27

After changing to revision 34, the nodes of the static bodies stay at the origin, while the remote debugger shows the actors are in their correct position. Other bodies and characters are shown in their correct position. What may be the problem?

betajaen

27-08-2007 22:17:54

Are you moving them?

Because your not supposed to (because it messes up the flow of things), and it won't be noticed because the NxActiveTransform which the Scene Render code works with now, does not do static actors.

If you want "static-like" actors which you can move around, make them kinematic.

Night Elf

27-08-2007 22:29:53

You mean I can't use setGlobalPosition and setGlobalOrientation on static actors? I should create them in place?

The weird thing is the actors themselves do get repositioned, only the graphics remain at the origin...

betajaen

27-08-2007 22:44:40

Nope. Never with static actors; hence the name static. Create them exactly where you need them to be, after that, throw away the pointer!

It's not that weird, when you know it works. Obviously the NxActor moved, but nobody told NxOgre they did. So it thinks they are exactly where they should be.

Night Elf

27-08-2007 22:51:23

Nope. Never with static actors; hence the name static. Create them exactly where you need them to be, after that, throw away the pointer!

I thought it meant static as in "cannot be moved by interaction with other physics objects", that it wouldn't react to gravity or other actors colliding with it...

It's not that weird, when you know it works. Obviously the NxActor moved, but nobody told NxOgre they did. So it thinks they are exactly where they should be.

OK, I understand now.

By the way, I tried making actors kinematic and setting their mass to 0, but it has the same effect: NxActor moves, but NxOgre doesn't realise it.

betajaen

27-08-2007 22:53:30

Ahh. Then it's kinematic and static. Leave the mass to what it is, and raise kinematic the flag.

Night Elf

27-08-2007 23:21:21

Crating the bodies where they should be worked perfectly. Thanks!