Proper Setup For Repeated Input-Based Object Movement?
I am creating a BP for a large box the player can "push" through input when they are in close proximity to the side of it via a box collision. The components are there and I have the functionality scripted out to work for the most part, but I'm having a problem in enabling the player to retrigger this "push" behavior multiple times as intended.
If I have the section of my node network that gets the block's starting location run off an Event BeginPlay node, the block will be pushed correctly the first time, but never after that because the game doesn't know it's location after the first time since it's getting no updated information on its location.
I thought using an Event Tick would solve this since it is continuously updating information to the game on the block's location. However, this creates a different problem in that for some reason the block is pushed as far forward as is possible before the Sweep enabling stops it at the farthest wall that direction. Now, I have another box collision set up on the opposite side of the block to eventually enable the block to be pushed in the opposite direction, but at the moment that collision will also trigger just the one Timeline-based movement event. When I use this one and activate the push, the block will start to move but because the player character is in the way, it will stop short from the Sweep enabling. I have found that if I return to the other side and use the intended box collision to trigger the push after that, it will cause the box to be pushed correctly as specified originally by the Timeline I set up.
So, it seems as though I can get the static mesh to be moved as intended off an Event Tick, but can't initiate it in the intended way of simply crossing into the box collision and using input normally. Are there some parameters causing this to happen that I need to adjust to prevent what I've described from occurring? I've tried deactivating Sweep functionality, but that just sends the mesh through the nearby wall and farther off into the level, so I know that isn't the solution. Any suggestions would be really appreciated. Thank you.
Follow this question
Once you sign in you will be able to subscribe for any updates here