I'm making a game where player are constantly moving the camera without choice. With that said I'm trying to completely stop the cameras from moving in an instant. I've tried all I could think of but I kept getting the camera yanked back a bit afterwords. Any ideas on how to solve this issue?
I think when you use triggers to move the camera, the default setting is "use 10% deceleration". You're going to want that to be 0% and the camera should stop on a dime instead of slowing down a bit as it is applied. That might help, not totally sure though.
I think when you use triggers to move the camera, the default setting is "use 10% deceleration". You're going to want that to be 0% and the camera should stop on a dime instead of slowing down a bit as it is applied. That might help, not totally sure though.
I wanted a different camera than the common 3rd person one as they are able to go under the terrain. Also this camera set up doesn't require the player to baby the camera as much (if only I could put an emergency stop on it once the left mouse button is lifted.)
This is a minor issue as you can just single click to move the camera. It while the button is held down that I want the camera to stop immediately after it's released.
Just by glancing at your triggers I can tell that you are making this way to complicated for yourself. Any time that you find yourself making numbered triggers (i.e. TriggerPlayer1, TriggerPlayer2, TriggerPlayer3, etc) you should find a way to use an array. Although sometimes it seems more cumbersome to do so, making changes later becomes a lot easier, and it is easier on the compiler. (Well, at least it is in Java. Not sure how the Galaxy compiler compiles triggers)
To answer your question, you have one of the camera commands set to 100% deceleration, which is the exact opposite of what you would most likely want. Well, at least I would think. Also, you are doing a lot of the commands by turning triggers on and off. I would not recommend this, as it is similar, in my opinion, to using the "break" or "continue" statement in Java, which is considered bad coding. But then again, that is just me. If you are going to do it that way, I would make an array of triggers, if that is possible. I don't know if you can set a trigger as a variable, but if you can, do so.
I like your "avoid the terrain" idea here, although I would think that it could be handled much more efficiently with a terrain height check and a near clip setting. Just an idea.
I could combine the triggers for sure with the use of a few more variables, but I'm testing concept atm so optimization isn't a concern until there's a proof. The camera turns much more smoothly with deceleration set to 100%. I have tried setting it to 0%, but the ways I tested to stop the camera in place didn't make a difference. I may end up just taking out the holding of the button for continued scrolling as that would eliminate the need for the other triggers, create less lag in the process, and prevent the problem I'm inquiring about. However I'm still open for a way to lock the camera in place in the middle of applying another camera without rocking the camera a bit.
Lastly I couldn't find a trigger event that would prevent a player camera from going under the terrain. I was thinking that this direction in camera movement was more sound anyway as mentioned in my video.
I'm making a game where player are constantly moving the camera without choice. With that said I'm trying to completely stop the cameras from moving in an instant. I've tried all I could think of but I kept getting the camera yanked back a bit afterwords. Any ideas on how to solve this issue?
You'll need to post the triggers you're using to control the camera.
What do you mean by, "moving the camera without choice" and "yanked back a bit?"
I think when you use triggers to move the camera, the default setting is "use 10% deceleration". You're going to want that to be 0% and the camera should stop on a dime instead of slowing down a bit as it is applied. That might help, not totally sure though.
Ok I'm going to post some sample code:
Heres the camera:
I wanted a different camera than the common 3rd person one as they are able to go under the terrain. Also this camera set up doesn't require the player to baby the camera as much (if only I could put an emergency stop on it once the left mouse button is lifted.)
This is a minor issue as you can just single click to move the camera. It while the button is held down that I want the camera to stop immediately after it's released.
Just a really quick vid of what I've got so far.
Just by glancing at your triggers I can tell that you are making this way to complicated for yourself. Any time that you find yourself making numbered triggers (i.e. TriggerPlayer1, TriggerPlayer2, TriggerPlayer3, etc) you should find a way to use an array. Although sometimes it seems more cumbersome to do so, making changes later becomes a lot easier, and it is easier on the compiler. (Well, at least it is in Java. Not sure how the Galaxy compiler compiles triggers)
To answer your question, you have one of the camera commands set to 100% deceleration, which is the exact opposite of what you would most likely want. Well, at least I would think. Also, you are doing a lot of the commands by turning triggers on and off. I would not recommend this, as it is similar, in my opinion, to using the "break" or "continue" statement in Java, which is considered bad coding. But then again, that is just me. If you are going to do it that way, I would make an array of triggers, if that is possible. I don't know if you can set a trigger as a variable, but if you can, do so.
I like your "avoid the terrain" idea here, although I would think that it could be handled much more efficiently with a terrain height check and a near clip setting. Just an idea.
Great to be back and part of the community again!
@TacoManStan: Go
I could combine the triggers for sure with the use of a few more variables, but I'm testing concept atm so optimization isn't a concern until there's a proof. The camera turns much more smoothly with deceleration set to 100%. I have tried setting it to 0%, but the ways I tested to stop the camera in place didn't make a difference. I may end up just taking out the holding of the button for continued scrolling as that would eliminate the need for the other triggers, create less lag in the process, and prevent the problem I'm inquiring about. However I'm still open for a way to lock the camera in place in the middle of applying another camera without rocking the camera a bit.
Lastly I couldn't find a trigger event that would prevent a player camera from going under the terrain. I was thinking that this direction in camera movement was more sound anyway as mentioned in my video.