Closed fabiodr closed 2 years ago
Hi,
Sorry for the delay! You can use GenericJoint
in the next version, but it's not available yet in JavaScript port. Instead, RagdollJoint
with configured RotationalLimitMotor
and SpringDamper
may be able to cause the effect required.
var config = new RagdollJointConfig();
// limit all angular axes
config.maxSwingAngle1 = 1e-4;
config.maxSwingAngle2 = 1e-4;
config.twistLimitMotor.setLimits(0, 0);
// make limits elastic
config.swingSpringDamper.setSpring(2, 0.5);
config.twistSpringDamper.setSpring(2, 0.5);
// ... set axes, anchors, and rigid bodies
Hope this helps,
No problem and thanks for this guidance!!
Gonna try this soon :) Just wandering if it will perform multiple rotation revolutions instead of taking the shortest rotation path.
The GenericJoint in dev branch can be tested already? Will this joint be the right way to do it?
I also will try something like this, using custom forces, to learn about the topic.
FYI: the effect i want can be seen in this nice demo.
if it will perform multiple rotation revolutions instead of taking the shortest rotation path
Probably you're already aware of the result, but it surely does!
Hi, Does this new version have a torsional spring (that can restore direction in all axes elastically, by applying torque), or do you know how to apply a force like that?
https://en.wikipedia.org/wiki/Torsion_spring
Thanks!