Jump to content

Test out my spring script.


DerRidda
 Share

Recommended Posts

I made a very basic script for springs, which ties two objects together and restricts their movement with slider joints, if desired. You can chose whether force is applied to an entity or not.

Whatever distance they had when tied together is the spring's neutral position.

 

I haven't tested it a lot except for vertically connecting two boxes in a jack-in-the-box kind of fashion but there it seems to work reliably. Parenting isn't set up except for within the slider joints.

 

I would like for some of you guys to take a look at it and experiment with it some more.

 

Spring.lua

 

I strongly advise against turning of the sliders and this also doesn't work as great using more than one axis and might have issues with local vs global ccordinates.

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...