How to control the motion with LinearMovementProjectiveConstraint #5288
-
|
Hello everyone, I want ask about how to control the motion with LinearMovementProjectiveConstraint. 1 - When we apply movement with the LinearMovement, are we applying to velocity the DOFs? 2 - I'm so confused with how to control the motion with key times. First i tried to apply the motion at the time 0: LinearMovementProjectiveConstraint template="Vec3" indices="@BoxROI.indices" keyTimes="0 2 " movements=" Second tried to apply the motion now at time 2: LinearMovementProjectiveConstraint template="Vec3" indices="@BoxROI.indices" keyTimes="0 2 " movements=" Now with this second try, the object didn't move. Why didn't the object move in this case? On the third try, I added a null motion at time 4 with: The object starts from its original position and begins moving downward along the negative X-axis after 2 seconds. Why do I need to add a motion after the 2nd second (in this case is 4th second) for the movement during the 2nd second to be executed? And how can i make the the object totally stops at the time i want? And how can i change the direction of the movement, for example in the third try, the object is moving downward along the negative X-axis after 2nd second, how can i reverse the movement and make it move along the X-axis from the 4th second? Or make it move along the Y-axis from the 4th second? I've tried to test a lot of movements after but it didn't work and the object continue to move along the negative X-axis. Thank you everyone and have a great day! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hi First I'll explain what is a projective constraint. As explained in the documentation here : https://sofa-framework.github.io/doc/simulation-principles/constraint/projective-constraint/ a projective constraint simply project certain dofs of your system. It means that now its position/velocity is not determined by the forces but directly overridden by the value you are providing.
|
Beta Was this translation helpful? Give feedback.
Hi
First I'll explain what is a projective constraint. As explained in the documentation here : https://sofa-framework.github.io/doc/simulation-principles/constraint/projective-constraint/ a projective constraint simply project certain dofs of your system. It means that now its position/velocity is not determined by the forces but directly overridden by the value you are providing.
LinearVelocityProjectiveConstraint