Hi,
my project is a topdown game with a helicopter (from Vigilante) that moves only on the X and Y axis. The camera moves on a spline and a timeline, so that the helicopter can move independent from the camera. I want to restrict the movement of the helicopter to the viewport so that it cannot move outside the screen.
I first tried to get the viewport size from the camera and then clamp the heli movement, but I am a noob and could not get it to work.
So here is what I did instead:
- I made a hollow blocking volume in the level and set the collision settings of this blocking volume to only affect the heli (Character Mesh)
-
I created an event dispatcher in the BP_TopDownCharacter (the heli)
-
In the Event Tick of the camera movement, I made a Call for the Event Dispatcher
- Then I made a Bind for the Event Dispatcher in the Level Blueprint
It works and blocks the player as it should. But whenever the heli stops and has no movement input it also stops colliding with everything. So the blocker and even enemies just pass through the character. How can that be?
Please help, I am stuck for weeks now.