[solved][bleeding]"freezing" an Actor

gugus

11-06-2008 16:07:00

I would like to "freeze" an actor(stop moving and disabeling collisions) during an ActorGroup callback, and i have a strange behavior:My Actor is moving up(but he it stoped reacting to forces).

here is my code:

pActor->disable();

So i tried something else:
pActor->raiseActorFlag(NxActorFlag::NX_AF_DISABLE_COLLISION);
pActor->raiseActorFlag(NxActorFlag::NX_AF_DISABLE_RESPONSE);
pActor->raiseBodyFlag(NxBodyFlag::NX_BF_FROZEN);

And I still get the same result.

What am I doing wrong?

betajaen

11-06-2008 16:57:13

The last flag is a body flag (BF) so you have to raise it as one.

gugus

11-06-2008 19:10:46

I ill copied my code.In my code,it's a body flag.

gugus

12-06-2008 13:22:00

I found the error.Gravity was activated but I thought that it was not,so when my actor stoped moving,it was as if he was going up.

Still,there is something strange.With string SceneParams("gravity: no"),the gravity is still activate.

betajaen

12-06-2008 13:40:38

Just take out "Gravity: no" all together, default behaviour of a Scene is to have no Gravity anyway.

gugus

12-06-2008 13:48:42

Yep,i figured that out.But it's weird that when i add gravity:no, gravity is turn on...I will have a closer look at it.

betajaen

12-06-2008 14:41:14

It's a tiny bug I've noticed for a while. It's to do with the parsing of the string. Nothing major.