Game Development Community

Simplified FlyingVehicle?

by Paul Jeffrey · in Torque Game Engine · 05/25/2005 (10:27 pm) · 2 replies

Hi all,

I've been looking at the HoverVehicle and Flyingvehicle resources trying to figure out how to create a simple moon lander sim. Basically I just want 4 horizontal thrusters and a vertical thruster - no rolling pitching, yawing required. Does it make sense to try and modify the existing flying types, or should I bite the bullet and implement a new class? It's a really simple app - literally just land a vehicle on the moon (softly :-p )

thanks,
pj

#1
05/25/2005 (10:43 pm)
Hi Paul,

Having gone down this path with helicopters, I would recommend modifying WheeledVehicle.

Here's why:
The vehicle collision code is good at collisions, but it doesn't handle objects just resting on the terrain or DIF objects via the collision box very well. If you make your lander rely on the collision box, you'll find that it will continuously jump around on the terrain when it should really be at rest. There are some parameters you can fiddle with to minimize this and there is code which tries to work out if the object is at rest, but this has the effect of sticking things to the ground until enough force has built up to move it. The result is quite adequate for a flipped-over buggy, but not for a helicopter or moon lander.

Each of torque's vehicle subclasses contain mechanisms which hold the collision box off the ground in some way, and the wheeled vehicle class definitely gives you the most control.
#2
05/26/2005 (5:28 am)
Thanks Adam - I think you just saved me many hours of frustration.