Difference between revisions of "Talk:SetAngle - ObjectReference"

Jump to navigation Jump to search
imported>Terra Nova2
imported>Obstipator
Line 8: Line 8:


Yeah it's been known for some time that the engine uses a ZYX ordering. --[[User:Terra Nova2|Terra Nova2]] ([[User talk:Terra Nova2|talk]]) 2014-08-11T11:43:34 (EDT)
Yeah it's been known for some time that the engine uses a ZYX ordering. --[[User:Terra Nova2|Terra Nova2]] ([[User talk:Terra Nova2|talk]]) 2014-08-11T11:43:34 (EDT)
== Player.SetAngle() workaround ==
The Player object can only be rotated by the Z axis unless collisions have been disabled.
Here's some sample code from screenshot.psc to let you modify the X and Y angle:
<code>
; Rotate the camera
; Hack! The X angle doesn't get set if collisions are off, so
; turn collisions ON for a very brief period
ToggleCollisions()
; Set the angle on the player, this will move the camera
GetPlayer().SetAngle(afAngleX, afAngleY, afAngleZ)
; And reset collisions off again, we don't want the player to start falling
ToggleCollisions()
</code>
--[[User:Obstipator|Obstipator]] ([[User talk:Obstipator|talk]]) 2014-11-09T13:56:27 (EST)
Anonymous user

Navigation menu