shadowmapper
New Member
- Reaction score
- 0
Basically I need to lock custom cameras, so that the player cannot adjust the camera at all. The camera is generally locked to a fixed unit (invisible dummy unit). Right now I'm using a trigger which executes every .5 seconds of the game and applies the camera and locks it to the dummy unit if the player has entered a region with a locked camera (say, a building interiors).
The cameras and their unit focuses are declared as global variables during initialization (camera array, unit array) and when the unit enters the a region with a locked camera, a Boolean variable (array) is set to true, meeting the 'if' statement conditions for whatever integer in the array the region corresponds too, and then setting the corresponding camera and unit to be locked.
To clarify, I don't want to just limit the field of view, I want to prevent the user from zooming in or out with the mouse wheel, basically from adjusting the camera at all.
Locking the camera to the player's main unit is also not an option here for various reasons.
The trigger is GUI generated and seems to be working fine, just wondering if there is a better way to do this, as executing the trigger every .5 seconds of the game may cause memory issues on other systems, I really don't know. Any comment on this would be appreciated too.
The cameras and their unit focuses are declared as global variables during initialization (camera array, unit array) and when the unit enters the a region with a locked camera, a Boolean variable (array) is set to true, meeting the 'if' statement conditions for whatever integer in the array the region corresponds too, and then setting the corresponding camera and unit to be locked.
To clarify, I don't want to just limit the field of view, I want to prevent the user from zooming in or out with the mouse wheel, basically from adjusting the camera at all.
Locking the camera to the player's main unit is also not an option here for various reasons.
The trigger is GUI generated and seems to be working fine, just wondering if there is a better way to do this, as executing the trigger every .5 seconds of the game may cause memory issues on other systems, I really don't know. Any comment on this would be appreciated too.