- Home /
Change an object velocity without changing it's destination/target
Hello guys,
I'm currently working on a project where one of the users actions/inputs is throwing balls to hit a specific target. The mechanics are already working how it's supposed to, but I would like to "slow" down the velocity without changing it's path, or target.
Because I know that, if I change the velocity to a lower one, the ball will fall before hitting the target properly. Is there any way that I can change this?
I'm using physics formulas to predict and launch the ball properly to achieve the target position.
Thanks!
Answer by cjdev · Aug 27, 2015 at 06:54 PM
It sounds to me like you don't want to change the trajectory calculated with the initial velocity so instead of modifying the velocity during the path you can modify the delta time, in other words 'slow down' time so that it appears the ball is moving slower. To do this you would just divide Time.deltaTime (or whatever you're using for t in your trajectory equation) by some scalar factor that gives you the appropriate reduction you're looking for.
An alternative would be to reduce gravity and base the trajectory calculations on launching at the same angle.
Your answer
Follow this Question
Related Questions
I am trying to launch a 2d object toward the mouse. 1 Answer
How to set ball velocity after it was hit with a racket in a tennis game? 0 Answers
Calculate velocity to set to reach a target point on a plane considering the drag. 0 Answers
[Help] Hovering Ball Not Reflecting Off Walls 1 Answer
Knockback and Launch Angle 1 Answer