Making a loaded spring
-
I'm trying to set up a model where a spring is triggered after an object collides with it... I can set it up so that when I manually double-click it, it triggers, but what do I need to do is trigger it when another object hits it (or the object that it is grouped with.
Does anyone have any advice? -
Assuming you have SketchyPhysics 3 experimental (SP3 X), you can use onTouch to help with this. First, instead of a spring, use a slider, set a fixed value (0) as the controller, and play with the accel and damp until you get it satisfyingly springy. You can then replace the controller with a variable, e.g. getVar("spring",0)
Then, in onTouch of the same object, use setVar("spring",1)This means that when the object is touched, the 'default' position of the springy slider will move from the 0 position to the 1 position.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement