I am trying to creating 2d pool game (Top View). I managed to create cue (pool stick) pull and hit animation.
Now i want to add force to the white ball where the cue(pool stick) is facing.
Looking for help. Thanx in advance.
Solved!
// Get the forward direction of the entity
var forwardForce = this.entity.forward.clone();
// Scale the direction by the amount of force you want to apply
forwardForce.scale(4000);
// Apply the force
this.white_ball.rigidbody.applyForce(forwardForce);