Kinematic bodies with 0.9

daedar

19-05-2007 13:59:18

Hi,

let me explain the problem... I've got a network game with vehicles so when a player controls a vehicles, he only sends the position of the vehicle on the network. Thus, I need to make this vehicle Kinematic (no gravity, no fores, etc...).
The problem is that I don't really know how (there's no SetKinematic function and I can't find out how to use NxActorFlag or NxBodyFlag).
I tried putToSleep but I think the body can wakeUp automatically even if I never call wakeUp so that's not really what I want :(

Thanks

daedar

19-05-2007 14:06:40

Ok in fact the NxActorFlag is not in the NxOgre's namespace so I wasn't able to find it. I've done this, hope this is correct:

Set to Kinematic
nxBody->raiseBodyFlag(NxBodyFlag::NX_BF_KINEMATIC);

Set to not Kinematic
nxBody->clearBodyFlag(NxBodyFlag::NX_BF_KINEMATIC);

betajaen

19-05-2007 18:14:51

Daedar's way is fine. SetKinematic would be the same code anyway.