No chance of getting Rotation of an entity to conform to physical objects
via script! The 3 different axis in GG scripts behave 3 different ways:
X: always local
Y: gimbal mix
Z: always world
GG is better off being left as a 2D game tester. My ulcers are making me sick trying to get simple rotation script, test, change script, test, change script, test, change script, test try again for hours.
Free Script to test yourself:
xangle = 0
yangle = 0
zangle = 0
function testrotate_z_init(e)
end
function testrotate_z_main(e)
if g_Scancode == 23 then -- "i" less y
yangle = yangle - 1 end
if g_Scancode == 24 then -- "o" more y
yangle = yangle + 1 end
if g_Scancode == 37 then -- "k" less x
xangle = xangle - 1 end
if g_Scancode == 38 then -- "l" more x
xangle = xangle + 1 end
if g_Scancode == 51 then -- "<" less z
zangle = zangle - 1 end
if g_Scancode == 52 then -- ">" more z
zangle = zangle + 1 end
CollisionOff(e)
SetRotation(e, xangle,yangle,zangle)
ResetRotation(e, xangle,yangle,zangle)
Text(11,11,1, "yangle "..yangle )
Text(11,15,1, "xangle "..xangle )
Text(11,19,1, "zangle "..zangle )
end