Public Group

# I love how the halo banshee is controlled...

This topic is 3988 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

How can I emulate that? (Picking a direction with the camera and the plane does the rest) What I'd like to do is make an airplane fly towards a particular point. I can visualize how a vehicle could do this (turn wheels towards point as much as it can and drive forward) but a plane I can't. I can't think of how to balance yaw, roll, and pitch so the plane will gradually position itself in the direction. It would look unrealistic (and inefficient) if the only way it did it was to use yaw to rotate to the direction then pitch up/down to get there. I want to make the plane do banked turns and such to get there. I may be overcomplicating this, so straighten me out if that's the case. Also, what forum would this go best in?

##### Share on other sites
This is definately a Maths and Physics hybrid with an AItype question. See you there. (don't forget to read the FAQ's first)

##### Share on other sites
A simple impulse will probably work.

Every timestep work out which direction the plane should rotate to point in the intended direction and add a little rotation to the plane in that direction. It will still be moving forward so this will make it do the nice smooth turning, but it won't 'bank up' like planes do. So we need to add a bias, if the rotation needed to point in the intended direction is greater than a certain amount we also add a small amount of roll to the plane so it rolls in the direction that it is turning. Up to a maximum of 45 degrees or something. If it's already rolling too much we add a small rotation to straighten the plane up. All these little movements should probably be smoothed, so as the plane gets closer to pointing in the direction you want make these little rotations smaller. The roll should happen before the actual turning so perhaps it's a good idea to only add the rotation if the plane is rolling in that direction.

It's probably all about tuning, making sure all the values are right to give the plane the nicest looking movement. One thing to watch out for is oscillations, where you have two forces that bounce off each other. It might be that the 'straightening force' (which is how the banshee fly) is too strong and the plane banks back left and right then left again never calming down. It's important to slow down as the plane approaches it's goal (moving in a straight line).

In Halo the warthog did this a bit, after a sharp turn it swerves to the left, then right, then left a bit before straightening up.

1. 1
2. 2
Rutin
18
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633701
• Total Posts
3013445
×