How can I stop the camera from following the character on trigger?
I'm trying to find a way to constrain the camera of my side scroller to the top and bottom of my level, but let the character keep moving until it hits the top or bottom of the level.
Any thoughts on how to achieve this? I'm using the side scroller template as a prototype.
asked Oct 14 '14 at 05:10 PM in Using UE4
You probably want to remove the spring-arm and setup the required tracking logic yourself. Ie you will want manually set the camera's relative location.
Assuming that your pawn moves in X(left-right) and Z (up-down)axes, what you need to do is within each tick, set the camera's relative location = (0, [constant value], [calculated value]).
In this case the [constant value] determines how far the camera is from your pawn. [calculated value] is where the trick is. First you must identify the vertical center for your map. This is where the camera should stay. When you pawn moves up or down, you find how much higher or lower from this baseline your pawn is at. Neggate that value and that should be your [calculated_value].
try this and let me know.
answered Oct 15 '14 at 06:37 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here