Hello there,
I am writing this thread after dealing with a very strange and frustrating issue. I am making a billiard game, and trying to make the cue ball move via adding a force to its Rigidbody2D when hit with the cue stick. The ball’s mass is tiny, and I have increased the force multiplier to a ridiculously large number (currently at 5555), but the ball does not move at all despite having a very big velocity which is displayed in the inspector, please see attached image:
The following code is fired on the CueStick script when trigger enters cue ball:
Vector2 forceVector = new Vector2(
Mathf.Cos(this.transform.rotation.z * Mathf.Deg2Rad),
Mathf.Sin(this.transform.rotation.z * Mathf.Deg2Rad));
CueBall.Instance.Rigidbody.AddForce(forceVector * (this.force + 1f) * this.forceMultiplier, ForceMode2D.Impulse);
// this.force is changed according to user input, and it ranges from 0 to 1.
PS: There is another issue which currently is not the thing that bothers me most, but once I manage to get the cue ball to move, it will be very problematic (if I don’t get both solved)- the velocity doesn’t change at all, even though the ball’s linear drag is 1.
I will be very thankful to anyone who may try to help with this, I feel quite lost.
Thanks a lot in advance, and have a wonderful day!