I'm a little confused by the documentation and was hoping someone could suggest a better implementation strategy.
Here is my code so far:
Code: Select all
mFrameA = App.Matrix.Translation(0, 0, 5); # point on the ship where the tractor beam originates
mFrameB = App.Matrix.Identity # point on the ship we are pulling at
joint = BulletSharp.Generic6DofSpringConstraint(bodya, bodyb, mFrameA, mFrameB, True);
joint.EnableSpring(2, True)
joint.SetStiffness(2, 0.1)
joint.SetDamping(2, 0.5)
joint.LinearLowerLimit = App.Vector3(0, 0, 10)
joint.LinearUpperLimit = App.Vector3(0, 0, 50)
world..AddConstraint(joint);