AntonSynytsia / MSPhysics

A NewtonDynamics wrapper for SketchUp.
http://sketchucation.com/forums/viewtopic.php?f=323&t=56852#p516427
MIT License
55 stars 20 forks source link

How to connect a model and a joint with key trigger in MSphysic #26

Open codewudi opened 2 years ago

codewudi commented 2 years ago

Hi! I tried to connect a model to the specified joint in msphysics by pressing a key, but I tried for a long time and failed. I couldn’t understand it after reading the manual,

I don’t understand how to release one of the models bound on the specified joint!

help~!!! o(╥﹏╥)o

my scriptcode is ____

onKeyDown {|key, val, char| bx = simulation.find_body_by_name('bx') # a box model group jw = simulation.find_joint_by_name('jw') #a Piston joint

jw.connect(bx) #but it's wrong }