|
Hi, im trying to connect these series of cubes together as shown here : The orange cube is fixed in its position, and all the other cubes (with gravity) are connected in a series of fixed joints. My problem is that the fixed joint don't really fix the objects in their positions, but rather "dangle" around like a spring, as shown : How do I achieve a really fixed positions with a physics joint for all the connected bodies without the dangling effect while still enabling its "use gravity" and "is kinematic" option? I'm using javascript if it concerns anything,Thanks! Sorry for the pictures, coudn't figure out how to post them there.
(comments are locked)
|
|
Your best option what i use a lot for certain things is either turn the solver iteration count up in physics to make joints more solid, however this will add performance drain as it effecting every joint in game. Or what i normally use is a configurable joint lock all and then at the bottom u will find projection turn this on for rotation and position and underneath set the limits to 0, u may also have to turn solver iteration up a little depending on your setting. Remember setting this can make objects react differently, for example i made a bike game and the back wheel had to have a little room on the projection in order for the bike to have the right feel when applying forces. Many thanks for saving my life! Turning the limits to 0 reduces the wiggling significantly, thanks!
Mar 24 '12 at 03:28 AM
eric_c
(comments are locked)
|
|
Add the objects as children. This will make them "rock solid" as they will not bend, rather rotate the entire object if it gets too heavy. In this scenario you shouldn't keep the rigidbody on the child objects. I want the objects to be individuals instead of being a parent/childrento other objects, is there any alternative besides adding them as childrens?
Mar 24 '12 at 01:18 AM
eric_c
physics-simulations always need some "room" to operate and handle forces. Even in the real world every material does slightly bend / move in order to transfer / absorb forces. Simulating physics isn't an easy task since the simulation happens only at fix timesteps. You can try another joint type (ConfigurableJoint), but as already said it will never be "fix" like a parent-child-relationship. You can keep the child rigidbodies if you make them kinematik in the case you unparent them later. You could also try to disable the gravity on all rigidbodies so you don't have the bend-effect. If a joint breaks you could enable the gravity of the individuals to make them fall down.
Mar 24 '12 at 02:27 AM
Bunny83
(comments are locked)
|
