- Home /
how do i make an object fall onto a specific position?
hi, i want to have a ball(while i made) to fall from the sky and onto a specific coordinate and stop there i am not going to have colliders or rigidbody on it. How would i approach it?
Answer by efge · Apr 11, 2011 at 01:23 PM
If you know the start and end position you could use Vector3.Lerp
(or Mathf.SmoothStep for easing in and out).
Answer by AngryOldMan · Apr 11, 2011 at 01:24 PM
By scripting or animation.
If you script it you have to set the objects position in world space and then activate it (whether that be on awake, on start,m ontriggerenter etc) once activated add a function to transform.translate it to where ever you want it to end up it will then stop and that's it, end of.
If you animate it make sure your level is set up in the position you want it to be in. Then click on the object you wish to aniamte and then go to the window tab and select animation from the drop down menu. You then animate it in unity to move to where you want over the specified time you want.
If you don't know much about either of these methods then check out the script reference site and the animation editor documentation
Your answer
Follow this Question
Related Questions
Rotate Gravity 90 degrees for one object. 1 Answer
How can I keep small dynamic physics objects from occasionally falling through a mesh collider? 1 Answer
When an object travels a certain amount, it comes back to it's origin position 1 Answer
Infinite swing with SpringJoint 2 Answers
Throw a ball at a target 0 Answers