• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Rotated Camera and Setting Camera Bounds

Status
Not open for further replies.
Level 7
Joined
Apr 12, 2009
Messages
188
So I painfully realized that setting camera bounds when the camera is rotated any direction other than north is a bad idea.

Is there an easy way to get a specified player's camera rotation? That way you could quickly set the players camera rotation to north, set the camera bounds, and then rotate the camera back to the users rotation.

I know of the function:

  • Set CameraRotation = (Rotation of the current camera view)
which is the same as...
Code:
set udg_CameraRotation = GetCameraField(CAMERA_FIELD_ROTATION)

...from which player does that function get the camera field? If each player has a different rotation, whose rotation is returned by that function?


Thanks for any help!
 
Level 7
Joined
Apr 12, 2009
Messages
188
Ah, yes, thank you good sir!

[EDIT] Actually, I think what you meant to put in the second line of custom script was:

Code:
set udg_CameraRotation = GetCameraField(CAMERA_FIELD_ROTATION)
I haven't tested this yet though, not sure if that's right. But my point was to collect the camera field not to set it.
 
Last edited:
Status
Not open for further replies.
Top