Description

Tested in //UE5/Main CL#20966071
Tested in //UE4/Release-4.27 CL#18319896

Physics Constraint returns incorrect values for Swing1, Swing2, and Twist.

Steps to Reproduce
  1. Create a new Blank project with Starter Content
  2. Create a new Actor Blueprint
    1. Add a Static Mesh component
      1. Name the component 'SM_Stable'
      2. Set the Static Mesh to Shape_Cube
      3. Set the Location Z value to 200.0
    2. Add another Static Mesh Component
      1. Name the Component 'SM_Constrained'
      2. Set the Static Mesh to Shape_Cylinder
      3. Enable Simulate Physics
    3. Add a Physics Constraint component
      1. Set Component Name 1 to SM_Stable
      2. Set Component Name 2 to SM_Constrained
      3. Set Swing 1 Motion to Limited
      4. Set Swing 2 Motion to Limited
      5. Set Twist to Free
    4. In the Event Graph off of Event Tick:
      1. Get a reference to the Physics Constraint
      2. From the reference get 'Get Current Swing 1', 'Get Current Swing 2', and 'Get Current Twist' nodes
      3. Create a 'Format Text' node enter the following text into the Format section:
        1. Swing1: {Swing1}
          Swing2: {Swing2}
          Twist: {Twist}
      4. Connect up 'Get Current Swing 1', 'Get Current Swing 2', and 'Get Current Twist' nodes appropriately
      5. Create a 'Print Text' node then expand it
      6. Set Key to 1 and connect the Format Text's Result pin to the In Text pin
      7. Connect 'Event Tick' to the 'Print Text' node
    5. In the Event Graph off of Event Begin Play:
      1. Create a 'Set Timer by Event' node
        1. Set Timer to 2.0
        2. Enable Looping
      2. Drag off the Event delegate then create a 'Custom Event' node named 'Impulse'
      3. From impulse create an 'Add Impulse' node with 'SM_Constrained' as the Target
        1. Set the Impulse value to 0.0, 1000.0, 0.0
        2. Enable Vel Change
    6. Compile, Save, and Close the Blueprint
  3. Place the Blueprint Actor in the level
  4. Play in Editor
  5. Wait for the Impulse Event to fire

Expected Results:
Swing 1, Swing 2, and Twist values change with each tick.

Actual Results:
The values do not update.

Have Comments or More Details?

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

2
Login to Vote

Unresolved
ComponentUE - Simulation - Physics
Affects Versions5.0.2
Target Fix5.2
CreatedJul 7, 2022
UpdatedOct 19, 2022