Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

[09 August 2016] Added GetDirection.


  • This topic is locked This topic is locked
No replies to this topic

#1
Deftsu

Deftsu

    donthackourgames

  • Ex-Core Dev
  • PipPipPip
  • 4,812 posts

GetDirection(unit) -- returns Vector3 for current direction (face direction), works on any object! 

 

Code Example : 

OnDraw(function()
  local pos = Vector(myHero) + Vector(GetDirection(myHero)):normalized() * 300
  DrawCircle(pos, 100, 2, 0, ARGB(255,255,255,255))
end)

  • 3




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users