Teather?

Hey folks, is there a way to simulate something on a teather in realtime?
What i mean is lets say I have this object (long object) and at one end it has a “string” attached with another smaller object (much like a dog tag or something).

Now I dont want to have to animate the string moving around and set ipos in realtime for every movement the long object does.
Is there some sort of setup that lets the physics engine handle the swinging motion of the tag and string?

I want to do that as well! I think we’ll have to wait for the next official blender release, if they get ODE physics engine in there… not sure :frowning:

doogs

spline ik’s would be a blessing… :frowning:

some1 could always write a python script for it, but it wouldn’t be easy.

So i take it, no ones found the logic brick setup?
Hmm…damnit… :-?

Well, if anyone out there in the world of gameBelnder finds a method or a workaround for this, DO NOT HESITATE TO POST IT UP.

Well gah. Worked on it for about an hour. I can’t get the swinging motion right. I can get semi-working pendulum motion, but there is no dampening so it keeps swinging forever. If I get the swing to work right, I’ll definately post it.

Okay the object (say a ball) on the string would need to be parented to the string object which would have its origin at the opposite end of the string to the ball. You would need to add properties to the string object for the length of the string and the mass of the ball on the end. When ever a force is applied to the object the strings hanging from, a python script would be used to add an equivilent torque to the string, but acting in the oppersite direction to the force. The torque would be calculated from the force applied, the length of the string and the angle of rotation of the string. Something like:

T = -F L Cos(theta)

where T is the torque, F is the force applied to the object the strings hanging from, L is the length of the string and theta is the angle from the horizontal. This would need to be done for both the x and y axis. You would then need a second script linked to an Always sensor (pulse mode ON) which would apply a torque equivilent to the gravitational force on the ball. The damping would be done by making this gravitational torque slightly higher than it should be. The gravitational torque would be something like:

T = m g L Sin(theta)

In short its doable but would take some time. Another thing to add to my list of stuff I’ll do if I ever get time I think. :slight_smile:

Keith. 8)

I think that may be enough to get me going gorgan. I already am about halfway done: when the game starts the hanging object remembers it’s distance from the parent, and uses that to always stay the same distance. It just doesn’t take gravity into account yet, and when I tried to do it, I realized I had forgotten my old physics formulas. Thanks gorgan!

To quote Mr. Burns: “Ehxcellent, Its all falling into place…”

Sweet work Saluk & Gorgan

I’d really really like to know the method when you guys finish :smiley:

K, I made up a little demo. It’s pretty simple, although there was some annoying maths that I always forget that I had to figure out!

Tether point has a script that basically adds it to a list of objects on GameLogic so that it can eb accessed by other objects.

Right now the speed is based on framerate (which affects how much it swings as well) and its only 2d, but adding 3d and framerate fix wont be too hard. I dont feel like working on it any more though for a while:)

Have fun.

http://mysite.iptic.com/spinhead/tether2d.blend

Controls:
Move around the tether point with arrow keys to watch the tethered object swing to and fro!

Cool saluk! The only thing i didn’t like is that it goes a bit too fast and doesn’t stop swinging. Also, the tethered object should be able to go over the top of hte object, no constraints.

Just my 10 cents,

Pooba

It should be able to go over the top of the object, it just never has enough force (I didnt constrain it not to be able to) and it DOES stop swinging. Right now its based on framerate, so it will be too fast on some computers and too slow on others. It’s only just right on my computer:) In the next version I’ll set it up so it’s based on a timer rather than framerate, and that should work a bit better.

well well well…i like that idea, looking pretty cool saluk! keep on going… :wink:

Hey when I take the Debug properties off, then it’s too fast for my
computer…

Hehe, xintoc:)

I’ll reconfigure it to use timer shortly.

F#$KING AWESOME SALUK!!! :smiley:

SO close, almost there :smiley:

that link is broken. any chance of a new one?

necrothreader! this thread is 3 yrs old…

Hey, I want the link too!

the new bullet physics engine has this stuff built in so dont worry about trying to fake it somehow :smiley: