Simple Static Object Reposition

jackjohnson
Posts: 8
Joined: Tue Sep 23, 2008 10:07 am

Simple Static Object Reposition

Post by jackjohnson »

Hi everyone,

Many thanks for this amazing physics engine.

I have a simple question. I am attempting to move an object that is STATIC (exported as static from Blender).

I have gathered that I cannot simply apply a transform to a static object and it must be KINEMATIC (is that correct)?

If so, is there a simple way within a function that I can make the static object KINEMATIC, apply a transform, and then re-flag the object as STATIC only??

I need to revert the object to static (and not kinematic) because I am working on iPhone, and the CPU of many kinematic target makes the simulation unrunnable on iPhone...

Is this possible? Would you be so kind as to provide an example as a guide? I am relative noobie to the Bullet SDK.

Simple Question: Can I update the x, y, z location/position of a static physics object?

Thanks!
mickey
Posts: 107
Joined: Fri Sep 19, 2008 6:08 pm

Re: Simple Static Object Reposition

Post by mickey »

Hi

If you meant static object to have a mass of 0 in Bullet, then no I don't think you can move it. Bullet optimizes static objects (ie, having mass 0) internally for collision detection and other physics aspects.

I'm not sure about converting from one body to another - but you can disable the collision from the btCollisionObject and it would not react to collision, allowing you to control its movement manually. (see CharacterDemo, btKinematicCharacterController).

But yeah you can flag the objects from one state to another I suppose.

Hope that helps.