Physics Engine making constraints

• 04-17-2011, 06:30 AM
sgthale
Physics Engine making constraints
So im making a game and currently working on a simple physics engine. Can anyone help me how to make rigid constraints? As in fixing 2 points to a certain distance from each other and then from there making a ragdoll body. I know its a big question but id appreciate it if anyone posted their thoughts in at least pseudocode.
• 04-17-2011, 10:35 AM
Skiller
How familiar are you with the workings of physics engines?
• 04-17-2011, 11:55 AM
Dark
This would definitely not be a intro to java question.
• 04-17-2011, 12:13 PM
Jodokus
You have to provide more detail. Are you working 2D or 3D? Are you just experimenting with physics: very informative to try in Java.
But if you seriously try to make an engine: they are huge and complicated projects often made in a language like C++ and called from Java (and probably better then your own).
Try to see the interfaces of Physics engines like ODE or JBullet to get the idea of what is needed, you can then make your own selection for a "simple physics engine".
Make some effort and then pose specific questions here when you are stuck.
• 04-18-2011, 02:07 AM
sgthale
well i have made a physics engine and sorry but i forgot to include that its 2D. My current way of doing constraints is simple taking 2 points, finding their midpoint and then making them have the same distance from that midpoint at the same angle they face each other. It works well but if i do it with multiple lines of with this constraint, I get wobbly lines. So i was looking for a better way to make constraints.

Also for the not intro to Java, well i just thought making constraints was simple
• 04-18-2011, 02:50 AM
Jodokus
I'm may be too sleepy, but I just don't understand what you want.
I'm figuring a kind of puppet on a string now. What are the constraints, what are the two points, what are the same angles? Is it the puppet moving symmetrically? Is there gravity? What makes it move? Is the constraint that it can't reach its toes? :confused:
You understand, I'm lost, but maybe to someone else it is clear.
Try to post idea's and some code that you have, and point out what is not working as expected.
(preferrably a SSCCE)
• 04-18-2011, 03:09 AM
sgthale
Okay ill narrow down my question to what i need help with: How would you make a solid fixed constraint between 2 points on a 2D plane....

[EDIT] ill take it to advanced Java
• 04-18-2011, 09:49 AM
Jodokus
I can feel your despair, but I don't think it's a good idea to break the thread. People then miss the bright narrowing down of your problem. And "they" are not more clairvoyant "over there". Only now I get the idea that it has something to do with collisiondetection because of the word "solid". I think you should give the information to not make this a guessinggame. Of course you can politely tell me that I'm a to slow thinker and to please back of. Then hopefully the others will jump in.
Again: provide a clear idea of the problem and your solution, and some code that is not performing as expected.
• 05-04-2011, 11:14 PM
sgthale
Okay well I am not worrying about the collision detection right now. I am just simply looking for a way to constrain 2 points to a fixed distance.