I was working on Car Wars game so I require throwing the car which crosses circuit boundary.
The following image depicts my point clearly:
Now as per my programming setup, I require throwing my car through force/velocity manually applied and I want to flip the car in the car throwing direction.
I have tried myself about this but didn’t able to get the desired result.
myRigidbody.AddForce(transform.forward * 80f);
Vector3 currentRotation = transform.eulerAngles.normalized;
myRigidbody.angularVelocity = new Vector3(currentRotation.x * Random.Range(10f, 40f), Random.Range(10f, 20f), currentRotation.z * Random.Range(10f, 20f));
Here are the car inspector settings:
Now share your side suggestion regarding this, I want to give force and angular velocity manually based on side of the circuit car diving.