I wanna create a vehicle that’s anchored and can still move. I already made the turning, but I can’t figure out how to correctly move the vehicle forward and backwards.
What I want is to make the vehicle move forward in any rotation
Right now, the turning works, the movement also kind of works but it only goes on the z Axis, so when u turn, it doesn’t go in that direction, it moves only on the z axis. I’ve tried many ways such as creating two separate pivots, but that cancels out the other one. I also tried other methods and it doesn’t work. Here is the main part that I’m struggling with
local vectorFormula = CFrame.new(worldPivot.Position) * CFrame.new(0, 0, math.rad(-throttleAlpha * AlphaTM))
local rotationFormula = worldPivot.Rotation * CFrame.Angles(0, math.rad(-turningAlpha * AlphaSM), 0)
carModel:PivotTo(vectorFormula * rotationFormula)