How do I detect the angle a part gets touched at? I’m trying to make a touch based soccer ball and I want the direction the ball moves in to be decided by the angle it was touched at. So basically if the ball is touched by the side of ur leg it will move to the side. If the ball is touched by the front of ur leg it will move forwards, etc.
local dir = (touchPosition - ballPosition).unit
local touchAngle = math.atan2(direction.X, direction.Z)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.