Game Development Community

Thrust player side ways at any player rotation

by Kevin Dresher · in Torque Game Builder · 08/27/2010 (11:29 pm) · 1 replies

The title confuses me too, but i have been playing around with thruster and astroid controls. I am trying to get the left and right buttons to make the ship thrust sideways. The thruster controls does that but it is fixed on the x axis. How do i make it so the ship moves sideways at any rotation?

#1
09/06/2010 (10:30 am)
I can't believe no one answered your question.

What you need to do is first get the player's rotation, then use the function that adds an impulse force to the player to the direction you want to apply the thrust. That direction should be the facing + or - 90. I believe the function to do this is setImpulseForcePolar().