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"

[Bug] Enabling physics simulation during gameplay doesn't prevent overlapping bodies

I have a very simple setup (demo project attached).

A "Block" BP that is based on Actor and has two components. A BoxComponent as root and a StaticMeshComponent as child. The Mesh has NoCollision while the Box is a PhysicsActor. None of them have SimulatePhysics enabled initially.

I place two instances of this BP in my level. One precisely on the ground, the second precisely on top of the first.

alt text

In my Character, I implement a custom input action (bound to Tab) that iterates over all instances and sets SimulatePhysics to true on the BoxComponents. I would expect nothing to happen. Instead, the upper box falls through and into the first one.

This only happens if the second block either overlaps the first or is placed precisely on top of it, while editing the level. If the second box is slightly above the first with no overlap, they behave as expected (the second falls onto the first and is blocked/stopped by it).

This only seems to happen if SimulatePhysics is enabled via an input action. It doesn't happen if it's enabled in BeginPlay or at design time.

Here are some further experiments:

alt text

The first three stacks on the left behave as I described above. The three stacks in the middle use NoCollision for the BoxComponents and PhysicsActor for the MeshComponents. The last three stacks use PhysicsActor for both components. SimulatePhysics is set to false on all boxes.

I start the game, hit Tab to run the input action (enable physics on the components that are PhysicsActors) and this is the result:

alt text

Overlapping or touching boxes don't block each other in the two configurations on the left. Only the boxes that had a small gap behave correctly. I would expect all configurations to behave as the last three stacks (no overlapping blocks, initially overlapping blocks are pushed apart). And this is what actually happens, if SimulatePhysics is enabled in BeginPlay, instead of an input action (ignore the OFF in this one):

alt text

Here is a short video:

https://www.youtube.com/watch?v=V6u8-6cST9c

And the demo project:

https://mega.nz/#!iAJxxKhJ!9QORSYNR4VabGD5jTnRTTfQoNomqgskV4tNDYNhme28

Product Version: UE 4.9
Tags:
more ▼

asked Sep 19 '15 at 09:01 PM in Bug Reports

avatar image

Bajee
290 21 33 138

avatar image sharing Mar 05 '16 at 09:49 PM

I've also encountered this bug in UE 4.10.4. It happens often as a box will typically rest on top of another box due to gravity. I've tried this with a Static Mesh Actor (a cube primitive) as well as an Actor with Box Collider as root and Static Mesh Actor as child.

The solution I've come up with is to use linear and angular velocity dampening instead of pausing physics simulation. Although this does allow for some movement, I expect to control it by increasing dampening.

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

1 answer: sort voted first

Hello Bajee,

Thank you for the very detailed description and the demo project. I see what you're saying and I've reported the bug in our database. For your reference, the bug number is UE-21314. I'll be sure to let you know when any progress has been made on this issue and if I need to ask any more information.

Have a nice day!

more ▼

answered Sep 21 '15 at 09:56 PM

avatar image CleanCut Oct 07 '16 at 04:00 AM

This is marked "Won't Fix: Not much interest and the fix would be too involved to be done any time soon." See https://issues.unrealengine.com/issue/UE-21314

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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