Static Body with class-based syntax

jettero heller

02-02-2009 12:10:47

Hi everybody :)

I would like to create a static actor or body with a class-based syntax but I have not found the right attribute.

I tried with this code:


ActorParams* dynamic_ap;
ActorParams* static_ap;
dynamic_ap = new ActorParams("mass: 10");
static_ap = new ActorParams("Static: Yes");


but when I debug ActorParams::mBodyFlags and ActorParams::mActorFlags have both the same values. I'm a bit confused.
Which attribute must I set to make an actor or body static?

regards

--
jettero heller

betajaen

02-02-2009 12:16:13

"static: yes", and you don't need to "new" them.

[Edit]

Or you can do it the C++ way:

ActorParams params;
params.mMass = 0;
params.mDensity = 0;

jettero heller

02-02-2009 12:24:28

if possible I would not like to use "static: yes" but I need to do something like actor_param.static = true;

[EDIT]
I read now your edit, thank you