1 decade ago by newmicro
I'm trying to create an entity that has multiple bodies that react physically as one unit. So, say we're considering a human entity, I want a shape for the head, and I want to attach it to the body of the person (which could be just a square/rectangle). When either part of the person is struck (head or body), I want the entire person to react as one rigid unit (the key is that either of the two bodies could be struck, and the whole person will move).
I get that I need either a two body entity, or a single body with separate shapes, but I'm not really sure which of these methods will create what I'm trying to do.
Also, to keep the two bodies rigid (working as one unit), I understand I need to integrate a joint somehow to keep the head apart from the body. A distance joint perhaps, but assuming that is correct, the distance joint is based on multiple "bodies", so that may be the route I have to take.
Any examples I can look at? I've looked at the car demo, but it calls methods I don't see anywhere in the source code (and it's just a pastie, so not sure if it's working at all). Thank you so much!
I get that I need either a two body entity, or a single body with separate shapes, but I'm not really sure which of these methods will create what I'm trying to do.
Also, to keep the two bodies rigid (working as one unit), I understand I need to integrate a joint somehow to keep the head apart from the body. A distance joint perhaps, but assuming that is correct, the distance joint is based on multiple "bodies", so that may be the route I have to take.
Any examples I can look at? I've looked at the car demo, but it calls methods I don't see anywhere in the source code (and it's just a pastie, so not sure if it's working at all). Thank you so much!