Developer Notes

Any object that simulates physics will detach from it's parent. Physics simulation always takes place in 'world space', we don't currently support simulation local to a different reference frame.

Description

Attempting to get the Relative Location of a component that once simulated physics, but has been dynamically set at runtime to not simulate physics returns the World Location instead until the actor is selected in the World Outliner.

Found in 4.10.1. Reproduced in 4.9.2 binary and Main CL 2796221.

Steps to Reproduce

1. Open the editor
2. Create an Actor Blueprint
3. Add a Sphere Component
4. Set Collision of the Sphere to BlockAll
5. On Begin Play, Set Simulate Physics to True for the Sphere
6. Add a delay of 1-2 seconds and Set Simulate Physics to False for the Sphere
7. Get a reference to the Sphere Component, and Get Relative Location
8. Print the Relative Location on Tick
9. PIE
10. Select the Actor Blueprint in the World Outliner

OR if you are using the attached test project

1. Open the Project
2. PIE
3. Click on the TestActor in the World Outliner

Result: Initially, notice that the World Location of the Actor was being printed instead of the relative location, which is expected behavior for an object that is simulating physics. However, once you set the object to not Simulate Physics, the World Location is still being printed and does not switch to printing the Relative Location until you click on the Actor in the World Outliner.

Expected: Once you set simulate physics to false, the Relative Location would be printed instead of the World Location without having to click on the actor in the World Outliner.

Have Comments or More Details?

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

0
Login to Vote

By Design
ComponentUE - Simulation - Physics
Affects Versions4.9.24.104.11
CreatedDec 10, 2015
ResolvedDec 10, 2015
UpdatedJul 14, 2021