- Home /
Question by
QuocPham · Jul 22, 2016 at 08:19 AM ·
2d gamejumping objectmovinggameobject
How to make an 2d object jump from A point to B point?
I found the equation of projectile: x = x0 + V0*cos(omega)*t y = y0 + V0*sin(omega)*t - g*t*t/2
How to bring it to unity? I try
elapse_time += Time.deltaTime;
float x1 =x0 + V0* Mathf.Cos (omega) * elapse_time;
float y1 = y0 + V0 * Mathf.Sin (omega) * elapse_time - g * elapse_time * elapse_time/2;
but it not working. Im a newbie, Please help me! Thank you very much :)
untitled.png
(4.2 kB)
Comment