Page MenuHome

Apply Rotation moves mesh when Rigid Body World is active
Closed, ArchivedPublic

Description

System Information
Windows x64, GTX 560

Blender Version
Broken: 2.71 and git latest
Worked: unknown

Short description of error
When an object is under the influence of a rigid body world, applying rotation to it can cause its rotation to change. There should be no visible change to the object.

The bug can be worked around by setting bpy.context.scene.rigidbody_world.enabled = False.

Exact steps for others to reproduce the error

  1. Open .
  2. Apply rotation to either mesh.

The object will rotate around its origin when the rotation is applied.

Event Timeline

Tom Edwards (artfunkel) raised the priority of this task from to 90.
Tom Edwards (artfunkel) updated the task description. (Show Details)
Tom Edwards (artfunkel) edited a custom field.
Lukas Tönne (lukastoenne) changed the task status from Unknown Status to Unknown Status.Aug 11 2014, 12:53 PM
Lukas Tönne (lukastoenne) claimed this task.

Problem is the way the rigid body cache data works on top of the object transform. The apply transform operators (loc/rot/scale) only work reliably with static (non-animated/simulated) objects. This is because they actually apply the transform of the object to the vertex data, and then reset the transform to zero (identity to be precise). However, if the object is simulated or animated, the transform will be re-defined on the next occasion (frame change) by the animation system or rigidbody simulation.

You can see the same effect with keyframe animation: In the file below, apply the location to the cube, then go to the next frame and observe the sudden jump. The origin of the object is temporarily set to (0,0,0) by the operator, but then the animation system overrides it again. Same happens with the rigidbody cache (if you re-bake it it could work fine though).

There is no easy way to solve this really, resetting the origin basically invalidates all animation and simulation results.