How to control the motion with LinearMovementProjectiveConstraint #5288
Unanswered
Hoangn06
asked this question in
Write / Run a simulation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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="
-1e-3 0 0 0 0 0
0 0 0 0 0 0"
The object was moved from its original position to the opposite side of the X-axis at the beginning of the simulation, but when I launched the simulation and time began to progress, the object moved in the same direction along the X-axis, even though I had set -1e-3 (which should correspond to the opposite side of the X-axis). What happened in this case? Why did the object move in the another direction from what i had set?
Second tried to apply the motion now at time 2:
LinearMovementProjectiveConstraint template="Vec3" indices="@BoxROI.indices" keyTimes="0 2 " movements="
0 0 0 0 0 0
-1e-3 0 0 0 0 0"
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:
LinearMovementProjectiveConstraint template="Vec3" indices="@BoxROI.indices" keyTimes="0 2 4 " movements="
0 0 0 0 0 0
-1e-3 0 0 0 0 0
0 0 0 0 0 0"
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.
All reactions