Sunday, 15 March 2015

libgdx - apply force to an object in specefic direction with bullet physics -



libgdx - apply force to an object in specefic direction with bullet physics -

i'm trying fire cubes photographic camera origin, using cameras direction firing line. able alter amount of powerfulness delivered in shot int.

after looking though various bits of code found on web, next seems looking for.

obj.body.applycentralimpulse(vector3);

where vector3 giving forces in x,y,z

the next gives direction photographic camera looking at

vector3 dir = cam.direction;

how can combine dir , required force?

many thanks.

libgdx bullet bulletphysics

No comments:

Post a Comment