Alternatives to setOmega()?

SONB

23-04-2006 17:44:18

Hi there!

The API docs say:
setting velocity/omega directly for a body in realtime is not recommended for proper physics behavior

So what can I do to change these properties in realtime?



SONB

OvermindDL1

23-04-2006 17:52:11

Forces, move everything using Forces.

SONB

23-04-2006 18:12:15

Hm.. Yeah, that's what I thought too, but the forum is full of code samples of callback functions which use setOmega()...

Well anyway, I will follow your advice OvermindDL1 :wink:
Thanx :)


SONB

OvermindDL1

24-04-2006 04:15:33

Honostly, I don't know what Omega does/is, so I just do what I've been told, I've been doing everything in my engine using Forces. :)

walaber

24-04-2006 04:51:23

Omega is the rotational velocity (how fast the object is spinning, and in what direction). it is the rotational equivalent of velocity.

to create omega, you apply a torque to the body. torque is the rotational equivalent of force.

OvermindDL1

24-04-2006 06:31:11

Ah, I've just been applying a force at the location of where the engine is located to turn on the vehicle I have, placed at 0,0,5 parallel to it.

walaber

24-04-2006 07:21:58

yeah. the OgreNewt helper functions addForceGlobal and addForceLocal do that for you. that create the force and the torque for a specific point like that.