Im making a car and I want it to be realistic in first person so im deciding to make a Steering Wheel rotate to the angle your turning. I ran into a problem where how could I get the right angle from you turning on a seat, or in general a steering wheel. I dont want to use CFrame since its choppy so what can I use to rotate the steering wheel. Thanks.
What I have so far
function steeringWheel()
local wheel = script.Parent.SteeringWheel
if script.Parent.Steer > 0 then
wheel.Orientation = Vector3.new(-30, 125.26, 35.26)
elseif script.Parent.Steer < 0 then
wheel.Orientation = Vector3.new(-30, -125.26, -35.26)
else
wheel.Orientation = Vector3.new(-45, -180, 0)
end
end
script.Parent.Changed:Connect(steeringWheel)
You actually would probably want to use CFrames, specifically in the C0 or C1 properties of either a Weld or Motor6D. The effect would not be choppy if you integrated it into the RunService via either RenderStepped or BindToRenderStep. Otherwise you could have a slower iterating loop which grabs the current turning direction and utilizes the TweenService to reach its target rotation