x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.18
Tags:
more ▼

asked Jan 19 '18 at 07:46 PM in Blueprint Scripting

avatar image

IIIDysphoricIII
56 1 1 6

avatar image vr_marco Jan 19 '18 at 08:28 PM

I have re-read your post three times but I still can't understand what the key issue is. Can you share a screenshot of your setup and of your Blueprints (the relevant part)?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question