Apply Rotation example = Python and Logic

Space = spin

A = 270

W = 180

D = 90

S = 0

Attachments

RotControl.blend (435 KB)

It’s a good implementation for if you want to turn an object to face one of the cardinal points. I’m not sure I’d call it a resource though as it doesn’t have a particular usage associated with it.

I think you’d do well to explore vectors and quaternions, they give a lot more flexibility and control than apply rotation.

With vectors and other mathutils you can do a lot of things such as align object to the ground while tracking to a destination, or apply movement based on the position of the mouse. You can have an object follow a path or curve, or anything else like that.

If you go on to use matricies and world transforms you can do even cooler stuff like having units moving in formation or orbiting other objects.

I heartily recommend diving in to the mathutils module because theres a lot of useful stuff in there that can really both simplify and enhance your games.