Spring Animator

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Spring Animator // The Garage

1  |  

Post by Délé // Jun 9, 2007, 2:51pm

Délé
Total Posts: 1374
pic
Hey guys,


I was messing around today and found a website with some spring mathematics on it. So I put together a spring script. This is to create realistic spring animation. You can run the script with a timer or you can keyframe the "Time" input on the script.


Here's a little explanation of the script:


Time - Link a timer into this or keyframe this input. This drives the animation.

Speed - Naturally this will adjust the speed. If set to one, it runs at the same speed as the timer. So usually less then one will yield smoother animation.

Amplitude - Set this to the amount you want the spring effect to start. For instance, if you set it to 90, the output will start from 90 and decay from there.

Decay - This is how quickly you want the spring movement to decay. Setting a higher number will create a stiffer spring effect.

Floor - This is the number that the spring will finally come to rest to. For instance, if you set it to 0, the output will eventually stop at 0.

Reverse - This will reverse the spring to start from the other direction.

OUT - Link this into one of the matrix inputs for an object (Location, Rotation, or Scale).


6757


6758


Here's the script and a scene that demonstrates a few different ways to use it. Just start the timer.

Post by 3dvisuals dude // Jun 9, 2007, 4:50pm

3dvisuals dude
Total Posts: 1703
pic
Wow!

Excellent work - thanks!

- 3dvisuals dude

Post by RichLevy // Jun 10, 2007, 12:54am

RichLevy
Total Posts: 1140
pic
I was messing around with a car suspension some months back, I am wondering whether I can use your Spring Animator... thanks for doing this Dele, it gives me something to work from :D


Rich

Post by Délé // Jun 10, 2007, 3:06pm

Délé
Total Posts: 1374
pic
Thanks guys. :)


It might work to simulate car suspension, depending on what exactly you're trying to do. I'm not sure how many real useful purposes this script will have, but I figure it may come in handy for odd things here or there.

Post by frootee // Jul 5, 2007, 9:52am

frootee
Total Posts: 2667
pic
Hmm... I was thinking about taking one of the cars from the library and creating a Low-Rider with those funky jumping effects... :cool:


Frootee

Post by roman // Jul 5, 2007, 1:31pm

roman
Total Posts: 320
Hmm... I was thinking about taking one of the cars from the library and creating a Low-Rider with those funky jumping effects... :cool: FrooteeLet us see some videos:)

Post by frootee // Jul 5, 2007, 4:15pm

frootee
Total Posts: 2667
pic
Here we go. Not really a video (YET) but just modifications to the spring timer stuff.

Per Roman's request, this is the beginning of a lowrider car jumping. More will follow.

This is my first go at the link editor. It could and will look better but this is not too bad for a start. Just follow Dele's instructions: Push the Start Timer button and watch the car Rock!

That's a good question then. How do you create keyframes from a timer type script? Add commands to the script? Most likely...

Frootee

Post by frootee // Jul 13, 2007, 6:52am

frootee
Total Posts: 2667
pic
well that's odd. I guess the car never got loaded. I'll do that tonight. Sorry about that!


Froo

Post by trueSpaced // Jul 13, 2007, 7:15am

trueSpaced
Total Posts: 544
pic
That's ok.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn