I have a ball and it’s rolling and I want it so when I click it it jumps ?
I have a script I think i have a problem with it.
P.S I’m new please no hate!
function OnMouseEnter()
{
rigidbody.AddForce(transform.y *500, ForceMode.Acceleration);
}
hi
try
function OnMouseDown()
{
rigidbody.AddForce(Vector3.up * 1000, ForceMode.Impulse);
}