hi, i have a gameobject sphere and i want it to jump exactly like arc if i press space bar…i don’t have any idea to do… plzz help
Use a rigidbody component if you want realistic physics like this! Then when you want it to jump in a smooth arc like so, just use
rigidbody.AddForce(jumpVector * jumpPower, ForceMode.Impulse);
and your rigidbody will use the physics engine to fall to the ground in a neat arc!
You will, of course, need to tune jumpVector (a vector3) and jumpPower (a float) to whatever your game requires, but the base line of code remains the same.