Need help with math for a raycasted suspension system

How would I get a point on a circle’s surface? I need this to know my raycast origin point. If there’s a better way to do this let me know.

Kinda hard to describe but it’s like this (excuse my drawing skills lol):

1 Like

You can get the points in red if you know the radius of the wheel
Your point position will be
X = radius * cos(angle)
Y = radius * sin(angle)
Z = your wheel Z

--WheelX, wheelY and wheelZ are the coordinates of the center of your wheel
local angle = math.rad(10) --10 degree angle
local radius = 2
local wheelPosition =*math.cos(angle), wheelY+radius*math.sin(angle), wheelZ)

Thank you :​)​​​​​​​​​​​​​​​​​​​​​​​​

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.