Game Development Community

Disallowing rotation on a given axis

by Mat Valadez · in Torque Game Engine · 05/06/2011 (8:32 pm) · 1 replies

I have a FlyingVehicle that I want to move in a straight line.

No matter how it is steered, it should never turn left or right. It can roll or pitch up/down, but I want it to always point towards the same direction. Think of an airplane that's flying forward, it's nose is always facing the same direction.

How should I go about doing this? I'm guessing there's a simple way to hack it so that it does not rotate about a given axis, but transforms and matrices aren't really my thing.

#1
05/06/2011 (9:52 pm)
From what I remember, when writing the AIs for Buccaneer. There's a variable in the engine for vehicles named "mSteering.x" that you can assign to 0 so the vehicles won't turn left or right. And I think it was "mSteering.y = 0" so it won't turn up or down.

I only used transforms or metrics when I need to know where the AI vehicles needs to turn to.