I’m trying to make a plane pitch and roll. However, for some reason the speed at which the plane rotates is not consistent and sometimes it pitches faster than it can roll. The angular velocity and torque of the pitch and roll are the same
Here’s a video of the problem
Does anyone know what the problem here is and how I could fix it?
You should post your script so we know what you are doing to help fix it.
Are you using VectorForce, or the deprecated BodyForces?
local function PitchStop()
parent.Pitch.AngularVelocity = Vector3.new(0, 0, 0)
end
local function RollStop()
parent.Roll.AngularVelocity = Vector3.new(0, 0, 0)
end
local Pitch = coroutine.create(function()
while wait() do
while wait() do
if status[3] then
parent.Pitch.AngularVelocity = Vector3.new(-2, 0, 0)
elseif status[4] then
parent.Pitch.AngularVelocity = Vector3.new(2, 0, 0)
elseif status[3] == false or status[4] == false then
break
end
end
PitchStop()
end
end)
local Roll = coroutine.create(function()
while wait() do
while wait() do
if status[5] then
parent.Roll.AngularVelocity = Vector3.new(-2, 0, 0)
elseif status[6] then
parent.Roll.AngularVelocity = Vector3.new(2, 0, 0)
elseif status[5] or status[6] == false then
break
end
end
RollStop()
end
end)
coroutine.resume(Pitch)
coroutine.resume(Roll)
I am using VectorForce to create thrust and AngularVelocity to Pitch and Roll.