- #1
saad749
- 2
- 0
I have an Archery game. I am firing the arrow with the projectile equation. I need the arrow to transform it angle during the flight as happens in real life. (For Example When Firing the Arrow at 90 degrees the Arrow should return with its head pointing straight to the ground and similarly for other angles). Is there any generic equation to calculate the transformation of the angle based on the initial angle, initial speed(x/y components), distance, time etc.
x = (Vi * Math.cos(Initial Angle) * t)+ 75; // Vix * t
y = ((Vi * Math.sin(Initial Angle) * t) - (0.5 * 10 * t * t)); // Viy * t - (0.5 * g * t^2)
A Example of what type of transformation I need : link deleted
In the above game the arrow always falls tip downwards no matter what the initial angle and velocity. I have to replicate this.
I am not a physics guy, so might be missing something very unreasonable and am implementing this game in Javascript :P
x = (Vi * Math.cos(Initial Angle) * t)+ 75; // Vix * t
y = ((Vi * Math.sin(Initial Angle) * t) - (0.5 * 10 * t * t)); // Viy * t - (0.5 * g * t^2)
A Example of what type of transformation I need : link deleted
In the above game the arrow always falls tip downwards no matter what the initial angle and velocity. I have to replicate this.
I am not a physics guy, so might be missing something very unreasonable and am implementing this game in Javascript :P
Last edited by a moderator: