Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Opened 15 years ago

Last modified 10 years ago

#309 new task

Spaceship steering — at Initial Version

Reported by: rgrieder Owned by: nobody
Priority: major Milestone: Version 0.2 Codename: Bellatrix
Component: Control Version: 0.2.0
Keywords: PPS Cc:
Referenced By: References:

Description

When the physics features were merged with the new Engine feature, a conflict has arisen that still exists. The main problem is the fact you want to steer a spaceship quite directly but a physics engine doesn't like that very much.
Another thing that needs some thinking: The engine class works with local velocities. So when you accelerate straight forward and then yaw by ninety degrees, then ship will stop abruptly because the lateral speed is limited at a lower level than longitudinal speed.

This could be sorted out by calculating the maximum thrust in function of the damping and maximum speed. But I guess that requires some looks into the Bullet code to see how damping is realised (most probably a linear velocity dependent factor in the differential equation which makes damping exponential).

The angular part is a little bit trickier. From my observations it is best to have a direct mapping of the mouse position to the orientation. Applying this directly to a ship can result in sudden movements (esp. if you look at another player…). I therefore suggest to make the camera direct and the spaceship adjust to the camera position. From what I know about the current implementation of the camera handling, this is not very easy to be done (other way round is not a problem).
As an example, this kind of steering is used in Unreal Tournament with vehicles.

Change History (0)

Note: See TracTickets for help on using tickets.