#humanoid, joints throwing agent around the room
1 messages · Page 1 of 1 (latest)
Make sure the balls don't have colliders
@tender bane
The default sphere object has a sphere collider
Did you add joints to the spheres too?
yeah, unfortunately still happening :( All of the colliders and joint collisions are disabled, and I have another script that is disabling the collision for each ball with the rest of the limbs. so no internal collisions on them at all
yes! It might be an issue with the relativity of mass on the humanoid, but even with the balls at an incredibly low mass it's still happening
Yeah avoid adding joints to them. The joint usually always affects the other body in some way
Just make the spheres children of the bones or something
With no rigidbody, no collider or anything
These spheres dont need any physics because it's for visualization, right?
Ahh alright, thanks!
They need the physics because of the desired result (joints touching ground, agent can learn to use the joints, etc)
I was considering parenting them but there's always the issue with scaling. The unity ml-agents walking project has an empty parent for each limb, and then a child for the mesh and a child for the rigidbody. That seems like a nightmare to work with 😆
But having a rigidbody as a child of another rigidbody is also a big issue... just remembered that
Yes, that's always bad
Unless the child (and parent?) is kinematic i guess
Maybe combining the mesh would be a solution
I'm not saying your ragdoll doesn't need joints, but why do the spheres need joints?
You said it's just for visualization
the spheres don't need joints per se, ideally they would have physics & collisions but it's not required
there is a sphere on the end of each "hand" and "foot" that DO need physics interaction, but leaving those on doesn't seem to be causing an issue. probably because it's the end of the chain
They can still have a collider if they are a child of a limb rigidbody
It will become part of the rigidbody
The sphere itself doesn't need its own rigidbody
incredible information, thanks!
that's how I'm going to proceed then, and I'll work around the scaling issue
Try to keep your rigidbodies at 1,1,1 scale
Each limb can have a separate child for the visuals (mesh renderer + mesh filter), and you can scale the child
interesting, I havent heard of this before
It's just a good rule of thumb when working with physics
and a mesh collider? The rigidbody would just act as a solver parent?
Other uniform scales are probably ok too, like 2, 2, 2
No need for mesh collider. Use a box or a capsule
Box collider would align better with the visuals if you use a box mesh, but capsule is probably more stable for ragdolls
Since it's smoother
very interesting, really appreciate the help! I'm going to try this heirarchy out :)
And the collider can be on the parent (that has the rigidbody), or the children, doesn't really matter as long as it's not scaled weirdly