- Home /
Center of mass (or center of pull)
I have an airship (steam-punk hot air balloon) that needs to be kept upright to a certain degree. I have it so that an upward push is given when a key is pressed, but this just pushed the entire airship no-matter what angle it is. I would like to have it push only the balloon part, carrying the deck below it. I tried a center of mass, but to no avail.
cheers.
Are the balloon and deck separate GameObjects, connected by some joints or something?
The balloon and the deck are separate game objects, and they are connected by joints. The balloon needs to pull the deck up. sorry for not clarifying.
Also, you say that you want it to only push the balloon part, but how exactly is that different from what you see happening? You have an objectB attached by some connections to some objectA, floating in mid air. When you lift just the objectA, the connections lift objectB along with it. Are you looking for some swaying or perhaps some elasticity? $$anonymous$$aybe you meant to ask about tilting the baloon by applying force only at the front?
Answer by dissidently · Dec 27, 2010 at 12:59 AM
Methinks Martin has given up on this, or moved on. However for anyone else interested... ConfigurableJoints are the solution for this and just about every other thing you can think of with Unity PhysX. Much more powerful than they have any right to be.
They have a feature that enables their connection to stretch to a certain point before returning based on force, and control over the characteristics of the response when stretched that allow dampening(damping) and rebound (spring) settings, and bounce, which occurs at the extremity of stretch settings.
Works the same in rotation as motion. Enormously fun to play with. Great waste of time.
Even more interesting, they have "motors" that allow you to set a desired position for the connection, meaning you can apply a force to disrupt the desired position, instantiate in a disrupted position or at a disrupted rate of change or rotation and watch the joint correct over time based on how you setup the "motor". If the above case were a ballon and basket, judicious use of the motor on the basket combined with restrictions on the balloons rotation would see life like behavior.
For an airship, the problem sits in Mass. The balloon component of an airship is significantly less dense, AND buoyant, compared to the deck slung on it's underside. So they've gotta be two separate objects, with very different mass settings in their rigidbodies, and a strong connection via a fixed joint, or use a configurable joint with fixed liked settings before they will behave as expected under force.
Answer by Proclyon · Dec 13, 2010 at 09:22 PM
Think of it from this perspective , if you were an invisble hand, and you could push things anywhere with any force, how would you move the balloon? From below right? And the cords would lose tension and the basket goes up the balloon goes up aswell just a bit slower tightening the cords back together ( assuming you do a bit of a push ).
Well I'm thinking, did you explain the whole cords aren't non-bendable diamond cables in your scene ? Because if they dont act like that the whole thing will just go up instead.
How to fix it? Wish I knew, but hoping to shed some light on the problem and trying to help with interpreting the question correctly
I agree that the connection cables are probably the key to the problem. They need to be able to stretch (a bit) and compress or coil.