[SOLVED] Point of gravity, explosions

Hieran_Del8
Posts: 11
Joined: Mon Nov 12, 2012 3:20 pm

[SOLVED] Point of gravity, explosions

Post by Hieran_Del8 »

Is there a way to create a "point" of gravity (attractive force)? Likewise, can one create a point of an explosion (repellent force)? I'm not sure, but would btRigidBody::applyForce() do this?

EDIT 11/19/12:
Indeed, applyForce is the answer.
Last edited by Hieran_Del8 on Mon Nov 19, 2012 1:16 pm, edited 1 time in total.
Granyte
Posts: 77
Joined: Tue Dec 27, 2011 11:51 am

Re: Point of gravity, explosions

Post by Granyte »

the should be a such demo

but anyway for now yes you have to write your own code and use apply force to the object around it
Hieran_Del8
Posts: 11
Joined: Mon Nov 12, 2012 3:20 pm

Re: Point of gravity, explosions

Post by Hieran_Del8 »

Thank you for the verification, I've successfully used the function to generate points of attraction and repulsion.