How do I make a SliderJoint along Y axis?
Posted: Wed Apr 28, 2021 12:28 pm
Hello,
I was trying to make a dampener by constructing a SliderJoint as shown:
This code won't work since the dampener still vibrates in X axis. My intention was to have the SliderJoint move along Y axis(vertically) instead of X axis(horizontally). What should I do to change the SliderJoint coordinates to Y axis? According to the definition of a SliderJoint "The Slider provides a single coordinate along the common X-axis of the parent and child joint frames." Should I change the parent/child orientation, or should I add TransformAxis?
Please let me know what I could do or provide any insight. Thank you very much!
Best,
Chongyuan
I was trying to make a dampener by constructing a SliderJoint as shown:
Code: Select all
locationInParent3 = Vec3(0.01, -0.1, 0.053);
orientationInParent3 = Vec3(0, 1.57, 0);
locationInChild3 = Vec3(0,0,0);
orientationInChild3 = Vec3(0,0,0);
Lower_left_dampner_joint = SliderJoint('Lower_left_dampner_joint',Dampner_up_l,locationInParent3,...
orientationInParent3,Dampner_down_l,locationInChild3,orientationInChild3);
lower_left_ty = Lower_left_dampner_joint.upd_coordinates(0);
lower_left_ty.setName('lower_left_ty');
lower_left_ty.getMotionType()
lower_left_ty.setRange([-0.05,0.05]);
lower_left_ty.setDefaultValue(0.02);
lower_left_ty.setName('lower_left_ty');
translation_ly = TransformAxis();
translation_ly.setName('translation_ly');
translation_ly.set_axis(Vec3(0,1,0));
Please let me know what I could do or provide any insight. Thank you very much!
Best,
Chongyuan