Get an angle from entity 1 to entity 2

How would you go about getting an angle from a ball to a player.
I want to rotate the ball to always face the player, client side of course.

What would be the most efficient way of performing this.
(I’m currently digging through the wiki and throwing code at a wall, hoping something sticks).

Any help is greatly appreciated.


(User was banned for this post ("Wrong forum" - Overv))


local angle = (Player:GetShootPos() - Ball:GetPos()):Angle()
Ball:SetAngles(angle)

But really, this should be in questions.

Woops. Sorry about that, and thank you.
I had just stumbled upon Angle() and I’m using util.traceline to get the normal.

Also, I didn’t even see the sub-forums until now, I remembered having a questions sub-forum, but I couldn’t find it.
The new theme is a slight bit alien, and sub forums box is nigh-impossible to see for someone new to the layout.

If an admin would kindly lock this thread, move it, or delete, that’d be grand.