HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Locking Camera Distance/Angle/etc

07-12-2011, 10:20 PM#1
Fallen-God[LcR]
Hey,

I would just like to say first of all that I am a semi-professional programmer (student), so you do not need to explain any programming basics to me, but at the same time I first saw GUI/Jass yesterday, so am still unfamiliar with the natives/other functions which are out there.

Basically I am converting a lot of GUI into Jass for a map a friend made, and one of the options he added is locking the camera. Not to a unit, but just locking the Angle, Field of view, distance, far Z (which I don't know what it is), and rotation.

His method is to set those values on a timer continuously throughout the game. While it works okay, I would much prefer to disable the user controls, if that is possible, or veto the commands as they come is, if that is possible. Or use another method.
I did search these forums and thehelper.com, and only saw one person trying to do the same thing, and he did this method.

This is his GUI:
Trigger:
Lock Camera
Collapse Events
Time - Every 0.80 seconds of game time
Collapse Conditions
(Number of players in LockedCameraPlayers) Greater than or equal to 1
Collapse Actions
Collapse Player Group - Pick every player in LockedCameraPlayers and do (Actions)
Collapse Loop - Actions
Camera - Set (Picked player)'s camera Angle of attack to 285.00 over 0.00 seconds
Camera - Set (Picked player)'s camera Field of view to 70.00 over 0.00 seconds
Camera - Set (Picked player)'s camera Distance to target to 3750.00 over 0.00 seconds
Camera - Set (Picked player)'s camera Far Z to 10000.00 over 0.00 seconds
Camera - Set (Picked player)'s camera Rotation to 90.00 over 0.00 seconds

Cheers,
Fallen
07-13-2011, 08:33 AM#2
Fledermaus
Na, periodic timer is the only way.
07-13-2011, 10:09 AM#3
Anitarf
There is no event that would run when a user rotates their camera using the mousewheel/keys and there is also no way to completely disable this functionality to my knowledge, so all that is left is to override it periodically.

FarZ is the limit on how far objects/terrain may be to still be rendered.
07-13-2011, 10:34 AM#4
Fallen-God[LcR]
Okay, thanks both of you.