Man, I'm still not getting this working. Well, I have it working a bit.
I think I need to explain the set-up:
For my Left and Right movement of the ship I am using AddForce, not transform.position, ie, on my first state I have:
Get Axis - Horizontal. Multiplier - 8. Store - 'X-axis Global' (float variable).
Set Vector3 XYZ. X - 'X-axis Global'. vector3 variable - 'dirGlobal' (vector3 variable).
AddForce. Vector - 'dirGlobal'. X - 'X-axis Global'.
Smooth Look at Direction. Target Direction - 'dirGlobal'
I have a similar set up for Vertical thrust, and use gravity for down.
So, picture this example:
I hold down the Right key and the ship reaches a high velocity traveling Right (obviously), I tap the Left key and the ship rotates (on Y axis) to face Left, but due to inertia continues to travel at high velocity to the Right. I hold down the Left key, and eventually the ship slows down and starts moving to the Left. I keep holding down the Left key and the ship reaches high velocity traveling Left. etc etc etc.
My problem is that I can only seem to extract one usable variable from this, which is the 'X-axis Global' from the initial Get Axis action.
This float variable essentially holds 3 states:
Left Key down: float from 0 to -8 (the -8 comes from the multiplier in the Get Axis action)
Right Key down: float from 0 to 8
No keys down: 0
Using the Float Compare action, I have set Float 1 to 'X-axis Global', and Float 2 I have left as 0.
The boost left/right is working fine when the actual keys are being pressed down, ie returning a value...
Less Than - Boost Left
Greater Than - Boost Right
But when the ship is whizzing along due to inertia, and no keys are pressed down (X-axis Global = 0), the boost isn't firing, obviously.
Also, the Equal parameter in Float Compare doesn't leave me with anywhere to go. At the moment I've just set it to a loop, so it just returns no boost.
I'd really like the ship to be able to boost in the direction it's facing, regardless of any keys being pressed down, but for the life of me I can't figure out an action that returns a constant + or - (no 0 value) based on the direction of the X axis.
It's the Zero that's killing me.