Guest User

Untitled

a guest
Jan 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. local vel = randomplayer:GetVelocity()
  2. if vel:Length() > 0 then
  3.     local newpos = randomplayer:EyePos()
  4.     if randomplayer:IsOnGround() then
  5.         //we'll guess that he's running in a straight line..
  6.         local trans = vel * time
  7.         newpos = randomplayer:EyePos() + trans
  8.     else
  9.         //the player is falling in a ballistic/parabola movement
  10.         local eckswhy = Vector(vel.x, vel.y, 0) * time
  11.         local zee = vel.z * time - (300 * (time^2))
  12.         local trans = eckswhy + Vector(0,0,zee)
  13.         newpos = randomplayer:EyePos() + trans
  14.     end
  15.    
  16.     local zdist = (newpos.z - LocalPlayer():EyePos().z)
  17.     local distance = (newpos - LocalPlayer():EyePos()):Length()
  18.     local ecks = math.sqrt(distance^2 - zdist^2)
  19.     angCalc = calcTrajectoryAngle(ecks,zdist)
  20. end
Add Comment
Please, Sign In to add comment