Description

If something is executed before a SetActorRotation node on Tick inside of a SceneComponent class BP and then added to an Actor class BP, the physics will lag

User Description:

When using set rotation inside scene or actor component bp the target actor(with simulation on) physics is affected. Physics simulation like the gravity, or adding force seems to be stopped when the actor is rotating. Goes back after the rotation is finished.

Set rotation does work correctly when directly inside the actor bp. Also works properly when actor physics is off, while gravity is on.

Steps to Reproduce

1. Open the attached test project
2. Open the RotatorScene > Event Graph to see what is implemented
3. PIE

Results: The actor will start to fall but the fall will lag while it is rotating (no FPS drop). Once the rotation is complete, the actor will fall quickly.

Expected: For the actor to rotate correctly while it is falling. If the Print String inside of the RotatorScene is bypassed, the actor will rotate and fall correctly.

From scratch:

REPRO STEPS:

  1. Open QAGame in the Editor
  2. In the Content Browser find the asset Cube_rotate located here: /Content/Developers/jamescobbett (submitted to /UE4/Dev-Framework CL 3176717)
  3. Drag the asset into the Viewport
  4. PIE

RESULT:
The actor will spin, but not fall, despite Simulate Physics being turned on. This is because, in the BP, in Class Defaults, the Tick Group (under Actor Tick > Advanced) is set to During Physics. If you change it to Pre or Post Physics, the bug no longer occurs. This is where the initial confusion came from with linking the problem to Scene Components - the Tick Group defaults to During Physics, whereas on a normal static mesh actor it defaults to Pre Physics - so the bug wasn't initially reproducible unless you had the Scene Component.

It's also important to note the issue still occurs if you remove the Print String node, but it is much less obvious - the actor drops, but there is a slight stutter. Unchecking Print to Log on the Print String node can also reduce the impact of the issue.

Original repro kept below for posterity:

  1. Open a Blank project
  2. Create a SceneComponent class BP, name it 'RotatorScene', & open it
  3. Add the setup from Screenshot #1
  4. Compile & save
  5. Create an Actor class BP & open it
  6. Add a SphereCollision component & simulate physics
  7. Add a Cube component
  8. Add the RotatorScene class BP
  9. Compile & save
  10. Add the Actor BP to the level & place it in the air several feet
  11. PIE
Community References

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Simulation - Physics
Affects Versions4.13.14.14
Target Fix4.15
Fix Commit3213406
Main Commit3227721
Release Commit3275805
CreatedOct 13, 2016
ResolvedNov 29, 2016
UpdatedApr 27, 2018