3.27. s3d_rotate

#include <s3d.h>

int s3d_rotate( int object, float x, float y, float z );

rotate an object around the x, y and z-axis respectively. x,y,z may have values between [0,360] degrees.

You will usually only rotate around one axis, leaving the unused fields on 0, I guess. If you want to rotate around more than one axis, please note: The order of the rotation applies is y-axis, x-axis, and then z-axis. You can think of it as the earth position coordinates: x is the longitude, y is the latitude, and z is the rotation at this point of the earth around your bodies axis. (I wonder if that makes it any clearer ;)


Rotate is absolute, not relative!

/* object will be rotated 180 degrees around the x-axis, not 270 degress! */