- Home /
Question by
thatbigguy · May 30, 2011 at 05:10 PM ·
timedistanceanglerate
Creating an equation to simulate time based on rate and distance.
I am simulating the motion of a parabola using d=rt. My time equation will be:
t=d/r
In my game, d is player distance, and r is playerspeed + bulletspeed*Cos(theta). However when I compile and run the class, the display for the time (labeled timepart) does not change. how can I change it?
Here is my playerScript
function timepartChanger(){ timepart = (playerDist)/(playerSpeed + Mathf.Cos(mySlider)); }
Comment