Description

FBodyInstance::SetCollisionEnabled uses an incomplete conditional to determine whether or not it's in a Simulating or Non-Simulating state. This can cause cases where RecreatePhysicsState doesn't properly get called on PrimitiveComponents.

In most cases, this isn't a seen issue because EnsurePhysicsStateCreated may cover it up.

Steps to Reproduce
  1. Create a child of UPrimitiveComponent in C++.
  2. Override the OnCreatePhysicsState method and print that it's been called (see attached file).
  3. Override the OnDestroyPhysicsState method and print that it's been called (see attached file).
  4. In BeginPlay for this component, toggle between all physics states (see attached).
  5. Add this component to an actor in the level.
  6. PIE

Expected: "OnCreatePhysicsState - Called" should be printed for each transition from a non-simulated state (NoCollision or QueryOnly) to a simulated state (PhysicsOnly or QueryAndPhysics) and "OnDestroyPhysicsState - Called" should be printed for each transition from a simulated state to a non-simulated state.

Actual: Several transitions from simulated states to non-simulated states (and vice versa) do not trigger the expected calls.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-39633 in the post.

0
Login to Vote

Fixed
ComponentUE - Simulation - Physics
Affects Versions4.124.134.144.15
Target Fix4.16
Fix Commit3257167
Main Commit3293329
CreatedDec 12, 2016
ResolvedFeb 7, 2017
UpdatedApr 27, 2018
View Jira Issue