#### Archived

This topic is now archived and is closed to further replies.

# Try my physics demo?

This topic is 5321 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi I saw the great character physics in UT 2K3 and tried to implement it myself, to limited success... Getting the physics to work didn''t take very long, but positioning the model according to the physics skeleton is downright impossible! I''ve tried everything.... If nobody can help me than I plan to give up, since I''ve spent too much time on this already... Anyway, this is what I have at the moment. I''m confident I can fix the bugs with the physics, but if I can''t figure out how to draw the model over the skeleton then there''s no point... Right now this is how I''m trying to do it: I calculate the directional vector from the root joint in the physics skeleton to a child joint and then calculate the rotation required to go from the initial directional vector to this current one... and then apply the rotation to vertices that are attached to the bone corresponding to this joint on the model. (the model uses skeletal animation) But this looks terrible! I have no idea what else to do... Any suggestions would be very appreciated. Thanks

##### Share on other sites
A pretty decent start. Its not "flashy" but at the core its a good demo. Keep up the good work.

##### Share on other sites
Sorry if this is a double post but i love the whole hit CTRL and Mario dies. That is a great effect!

##### Share on other sites
Ya it is, but it''s pretty useless if there isn''t a mesh

##### Share on other sites
It doesn''t work... I get 404.

---
shurcooL

##### Share on other sites

worked for me when I turned off my firewall. It''s a cool demo, it looks like stairs dismount I always enjoy looking at demos with the ragdoll effect

##### Share on other sites
A firewall can''t stop an HTTP file download from working. It works fine for me now as well; I guess there was something temporary wrong with the server.

Trying the demo now...

---
shurcooL

##### Share on other sites
It looks like your joints are simple, single, point-to-point constraints - i.e. one point on the head is constrained to be colocated with one point on the torso. Anyway, this isn''t enough to stop the joints spinning around, which will mess things up.

You can easily construct "hinge" joints from pairs of the point-point constraints - this will stop the limbs from rotating around unwanted directions. However, your ragdoll will then look rather wooden, because hinges don''t represent the shoulder/hips/neck very well. Two ways of getting around this are:

1. make universal joints out of two hinge joints. These will work OK, allowing you to specify the joint limits independantly in the two hinges. However, every extra hinge introduces its own problems...

2. Make a "sloppy" hinge by using 3 point-point constraints:
        1BODY_A  2  BODY_B        3

Each number represents a point-point constraint between bodies A and B. constraint 2 is enforced strongly, so that the two bodies stay connected at all times. However, allow some sloppiness when enforcing the constraints 1 and 3 - controlling the amount of sloppiness will allow a bit of rotation around the non-hinge axes.

You also need to work out how to apply limits on the joints (can be done with a constraint on the max distance between two points on pairs of bodies), and also do self-collision between the limbs.

Might be able to help more/better if you gave some details about how you''re implementing this (e.g. put the source code in your zip file...)

##### Share on other sites

OK well I've updated the demo to show my attempt at applying the mesh to the physics model...

It looks terrible at the moment, because it can spin around the direction it points into.

(hit 1 and 2 to see the physics skeleton again)

I've also added the source into the zip file, so hopefully it's readable enough for you to understand what's going on

I know what you mean about adding more constraints, but right now I'm just concentrating on getting it to not look like crap when I apply the model to it. If I can't figure that out than it's not much good, for my purposes at least

[edited by - nexius on January 18, 2004 5:13:00 PM]

##### Share on other sites
I like fall out ... hum sry

1. 1
2. 2
frob
15
3. 3
4. 4
Rutin
12
5. 5

• 13
• 12
• 58
• 14
• 15
• ### Forum Statistics

• Total Topics
632121
• Total Posts
3004231

×