playMaker

Author Topic: Add Force 2d doesn't use 'self' space type - is there a way to add this?  (Read 1070 times)

Spunkyinteractive

  • Playmaker Newbie
  • *
  • Posts: 22
I am wondering if some functionality can be added to the action for Add Force 2d?

Currently with the 'Add Force' action i can set the space to 'Self' or 'World', this allows me to change the direction the object is moving simply by rotating the axis of its parent, so long as i use 'Self' space.

For example I have a gun as a spawn point for a bullet object. The bullet has a force of 100 in the x axis, if i change directions and aim the gun towards the negative x direction (left), the bullet will now move in that direction so long as i have set the space to 'self'. In the case of using 'add force 2d', i cannot change the space, so the bullet will always move in the positive direction regardless of which way its spawn point faces.

I understand that there are other ways to modify the value of the x force so that it can be a negative value when facing left (such as using multiply float by -1), however for various design and structural reasons i would like to avoid doing that and instead have it move in the direction it's spawner is pointing.

thoughts? will the 2d physics engine not allow for this?

-Stephen