This is what I get for jumping ahead

So during the little “and why won’t this work?” pause, I was already at work putting the rotation control keys in. Admittedly, the fact that pressing both would make the rocket explode (or whatever) hadn’t yet occurred to me, but I WAS thinking to myself, “Hm. Would it be more efficient to use the ol’ GetAxis there?” I’d been looking at the documentation for the inputs and was thinking I remembered something about GetAxis generally being preferable, so I went for it and wrote this instead (just commented out my old idea while I was testing if it would work so I could put it back without retyping it all if I didn’t like it). It does work, the difference being that if you hold down both keys, it just keeps acknowledging whichever key you pressed first.PD001

Seems like the downside of this approach is that when the rocket bumps into anything with a sideways angular velocity, it goes into an uncontrollable, permanent spin. On the other hand, since hitting something means you die (or finished the level) that’s not much of a concern!

Oh, nevermind, just upped the angular drag in the Rigidbody and that took care of it.

Privacy & Terms