I'm pretty new to Game Creator, and I have been working on a third-person shooter. I use an adventure cam as my main camera. When aiming down sights, there is no option to change zoom level of the camera through an action, so I change the camera offset to get closer. The problem is, when I move my character while aiming, it can go right in front of the reticle, which completely blocks the view. I have tried a number of different methods, however none have worked. I have listed the ones that got the closest below.
Method 1: Fixed Camera
I created a fixed camera that is swapped to when you aim. Fixed camera attached to the player on an offset seemed to reduce the amount the character moved around the screen. The problem is, this camera can not orbit, and I could not find a way to replicate orbiting for it through rotation locks or anything else.
Method 2: FPS Camera
This may sound counterintuitive, however, by showing the character model and placing the FPS camera on an offset behind the character, it keeps the character from running around the screen, and it can orbit. While this was so close to working, I had an issue while switching between cameras. There is no way that I could find to transfer the orbit rotation of one camera to another, so when switching to the FPS camera, the FPS camera snaps to the character's current direction. This means the character would have to fully rotate to the location before the camera is switched, and the problem is there is no way to check the character's rotation in comparison the the orbit, and the character rotates at a fixed rate that I can not change. This method does work, however, you need a .5 second delay to be able to aim down sights and fully rotate to wherever you want, and this causes issues with not being able to cancel aiming, and slows the flow of combat.
Method 3: Workaround with Player Direction
The best workaround I found is to set the Character Direction of the player to Camera Direction while holding a weapon, and to set the Character Direction back to Movement Direction while not holding a weapon. This allows for the FPS Camera Method to work, as the character will always be facing the orbit direction. The problem with this however, is you can't look at your character from a different angle while it is holding the weapon.
Does anybody know if there is something that I am missing to make this work?
Customer support service by UserEcho