Collision not working when standing still?
For a couple of days now, I've been trying to make a simple door. You open and close it with a simple button press. Everything works fine except for one thing. When the player character stands still while interacting with the door, it passes right through as if collision wasn't even enabled (which it is of course). But when moving around, collision works just fine and the door pushes the player along with it as it should.
I made 2 GIFs to make it easier to understand.
Standing still while opening/closing the door. Passes right through.
Holding down the W key (walking forward) while opening the door. I'm pushed along with it, as intended.
I'm using a blueprint with a timeline to open/close the door, and I'm using the first-person blueprint called "PlayerCharacter" from the "ContentExamples" as my pawn. I've tried, what feels like, every possible combination of collision settings on both the door and player character. I can't for the life of me figure this one out...
asked May 27 '14 at 04:15 PM in Using UE4
Sorry for the delay. There is some development being looked into to make this unnecessary but there is currently no timeline for a change. This is a simple workaround that can certainly be cleaned up, but it should help you get going. There's a few pictures so it'll take a couple comments to post it all.
The first step is to create a function in your Character Blueprint that will update the character's position when called. It includes a Vector Input. Really very basic:
Next, we need to add a component to the Door Blueprint. On the edge of the door opposite its hinges, add a box component. I called mine DoorEdge. We're going to update the door opening part of the Blueprint to set a Vector Variable with the DoorEdge's location at the beginning of the timeline.
answered Jun 11 '14 at 10:38 PM
Is your door a Physics Actor? In the MyCharacter Blueprint Components, check the Collision on the [ROOT] Capsule Component. The Capsule Component is what is used to detect collision with the world in general, rather than the Mesh. Expand the Collision Presets section. If you are using the Pawn Collision Preset, which the MyCharacter Blueprint uses by default, then the Collision Enabled will be set to No Physics Collision. Switch the Presets to Custom, and then switch the Collision Enabled to Collision Enabled.
Hope that solves your issue. Please let me know if it does not and we'll look into how you're moving your door.
answered May 27 '14 at 06:44 PM
Add blocking volume around your mesh which you want to be player pushed by. Attach this volume to mesh which you animate via matinee. In character BP, in capsule component, set trace complex on move to true. Then player will be moved by blocking volume. I tested it on 4.6 and it works.
answered Feb 07 '15 at 12:39 AM
I have come across lot of people complaining about this, and i Had the same problem with a mobile game im trying to make, I wanted to have lots of various traps that would be able to push the character, and i couldnt figure out how to do it well as when ever character is still, traps just went trough it
my solution? make the character move ! if the character is moving collision works so on tick, i move my character 0.001 to left, then 0.001 to right, the move amount is small enough not to be visible, and it makes the character be pushed by moving objects :)
may not be perfect but it works, hope this helps someone out there
answered May 30 '19 at 09:01 PM
Here is my decision. It looks like the previous one, but it’s not the player himself who moves, but the box created in it.
answered Jul 01 '19 at 04:46 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here