Torque Compensation for Strafe Input
Adjusted thruster firing to compensate for torque introduced by uniform application of strafe input to lateral thrusters.
This commit is contained in:
parent
56f97d82f9
commit
fae3b85213
4 changed files with 165 additions and 34 deletions
|
|
@ -61,6 +61,7 @@ public class Thruster : IAnalogBehavior
|
|||
var itemCenter = hullData.Shape.Inset(itemData.Shape, item.Position, item.EquippableItem.Rotation).CenterOfMass;
|
||||
var toCenter = hullCenter - itemCenter;
|
||||
Torque = -dot(normalize(toCenter), float2(1, 0).Rotate(item.EquippableItem.Rotation));
|
||||
Thrust = Context.Evaluate(_data.Thrust, Item.EquippableItem, Entity);
|
||||
}
|
||||
|
||||
public bool Execute(float delta)
|
||||
|
|
|
|||
Loading…
Reference in a new issue