You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm investigating an issue where some cable/chain made out of rigid-body capsules, attached to a kinematic rigid body, kind of oscillate in a weird way.
Using the debug view, I've noticed the kinematic object the cable is attached to seems to somehow decorrelate from the corresponding rendering object, in a non-constant manner (i.e. offset is irregular).
That irregular movement of the main kinematic object seems to be correlated with the oscillation of the rigid-bodies chain.
After some digging, I've seen that saveKinematicsState() is called with "fixedTimeStep * clampedSimulationSteps". However, we use motion states, and the getWorldTransform() method of these are basically returning position/orientation that are computed according the real time step (i.e. "timeStep", time elapsed between two render frames).
This means, velocities get computed by dividing a distance/movement that matches the rendering frame elapsed time, with a different time, leading to velocities being discontinuous between physics update steps.
Not sure my explanation is clear, if not please let me know...
Is that an expected behaviour ? Why not using the time step passed down to stepSimulation() to call saveKinematicState() ? Using current implementation, I understand the motion state should provide a transform that has been computed using the same "fixedTimeStep * clampedSimulationSteps", which is not the case in our implementation (and I guess, in others either) ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm investigating an issue where some cable/chain made out of rigid-body capsules, attached to a kinematic rigid body, kind of oscillate in a weird way.
Using the debug view, I've noticed the kinematic object the cable is attached to seems to somehow decorrelate from the corresponding rendering object, in a non-constant manner (i.e. offset is irregular).
That irregular movement of the main kinematic object seems to be correlated with the oscillation of the rigid-bodies chain.
After some digging, I've seen that saveKinematicsState() is called with "fixedTimeStep * clampedSimulationSteps". However, we use motion states, and the getWorldTransform() method of these are basically returning position/orientation that are computed according the real time step (i.e. "timeStep", time elapsed between two render frames).
This means, velocities get computed by dividing a distance/movement that matches the rendering frame elapsed time, with a different time, leading to velocities being discontinuous between physics update steps.
Not sure my explanation is clear, if not please let me know...
Is that an expected behaviour ? Why not using the time step passed down to stepSimulation() to call saveKinematicState() ? Using current implementation, I understand the motion state should provide a transform that has been computed using the same "fixedTimeStep * clampedSimulationSteps", which is not the case in our implementation (and I guess, in others either) ?
Thanks for any feedback.
Beta Was this translation helpful? Give feedback.
All reactions