Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local vel = randomplayer:GetVelocity()
- if vel:Length() > 0 then
- local newpos = randomplayer:EyePos()
- if randomplayer:IsOnGround() then
- //we'll guess that he's running in a straight line..
- local trans = vel * time
- newpos = randomplayer:EyePos() + trans
- else
- //the player is falling in a ballistic/parabola movement
- local eckswhy = Vector(vel.x, vel.y, 0) * time
- local zee = vel.z * time - (300 * (time^2))
- local trans = eckswhy + Vector(0,0,zee)
- newpos = randomplayer:EyePos() + trans
- end
- local zdist = (newpos.z - LocalPlayer():EyePos().z)
- local distance = (newpos - LocalPlayer():EyePos()):Length()
- local ecks = math.sqrt(distance^2 - zdist^2)
- angCalc = calcTrajectoryAngle(ecks,zdist)
- end
Add Comment
Please, Sign In to add comment