Game Development Community

Rigid link and gravity

by Phil Carlisle · in Torque Game Builder · 10/27/2005 (2:59 pm) · 3 replies

I'm trying to link one object with another so that there is a rigid link between them, but so that one of the objects is affected by gravity.

I've created the objects and created a mount between them ok. I've added a constant gravity force to one of them. But the mount doesnt seem to work.

I guess I dont want a "rigid" force, even though effectively it IS a rigid constraint. I basically want a stiff rod between the two objects.

Whats considered the best way to make what is essentially a completely stiff spring constraint?

Its kinda fun playing with things at this level though :) good fun just spamming some ripped sprites into a scene and impulsing them about!

#1
10/28/2005 (9:44 am)
Actually, thinking about it, arent link forces better off as a seperate entity in thier own right entirely? So that you can have a spring class that attaches objects? Rather than have a single attachment force?

My example would be something like:

Object MyOBject
Object MyNextObject
Spring MySpring
MySpring.attach(start,MyObject);
MySpring.attach(end,MyNextObject);
MySpring.setSpringConstant(value);
MySpring.setDamping....

Then you could have multiple springs attached to any single object.. like lattices etc?

Or is this already possible and I'm reading things wrongly?
#2
10/28/2005 (9:48 am)
Mounts (as you already have seen) are in T2D with mountForce delayed following, though constraints aren't currently supported =/

Gary "Chunkys" integrated ODE into T2D which adds supports for three types of constraints
#3
10/28/2005 (10:56 am)
Phil,

The positions are based upon the top-level parent e.g. the object that isn't mounted to anything. Also, there are no "joints" in T2D, therefore they don't transfer forces or anything. It's something that I'd love to work on but greater things gather on the horizon and all that!

You can mount lots of things in a hierarchy but forces can only apply to an object that isn't mounted to anything. They actually do get applied but the mount overrides it.

To do what you want, apply the force to the top-level object and everything will follow, rigid or not.

- Melv.