Code: Select all
#library "global"
#include "zcommon.acs"
script "leveltilt" ENTER {
while (1) {
ChangeActorRoll(0,sin(getactorangle(0))/50,1);
setactorpitch(0,cos(getactorangle(0))/50);
delay(1);
}
}
Currently if you LOADACS this script, it puts the whole level on a very convincing tilt, about 30 degrees to the east. This is exactly what I want. However, as you can probably guess, this locks the player's pitch. Taking out that part keeps the roll based on the player's angle, but it's not quite as pretty. Has anyone figured out the math or code that would allow for a true "yaw", at least within reasonable bounds? I'm not gonna be flipping 180 or anything.
