I'm implementing portals in my game and trying to figure out why I am seeing angular velocity changes after calling SetTransform. I have a group of bodies connected by revolute joints, and when they hit a portal, I teleport them using SetTransform. I also take into account rotation differences between source and destination portals, and rotate each of the bodies around the main center point for the group.
Before entering the portal in a simple test case, the bodies are usually flying through the air with zero angular velocity and some amount of linear velocity. After the call to SetTransform on each of the bodies and after the next simulation time step, the bodies slowly start to gain angular velocity from their revolute joint connections.
Has anyone else encountered this, and if so, how did you prevent it?
Thanks!
Before entering the portal in a simple test case, the bodies are usually flying through the air with zero angular velocity and some amount of linear velocity. After the call to SetTransform on each of the bodies and after the next simulation time step, the bodies slowly start to gain angular velocity from their revolute joint connections.
Has anyone else encountered this, and if so, how did you prevent it?
Thanks!