Page 1 of 1
P2P Questions (and answers hopefully)
Posted: Sat Jun 03, 2006 7:40 pm
by bmud
I'm going to kick off this with a question of my own. I opened up the demonstration file, attempted to make my own by copying the code into a file of my own. I imagine that documentation will take care of "you need a constraint variable for each axis for each object" blah blah.
Nevertheless, I noticed that if I use just the demo file, and delete everything except the white "rope" in the top-middle, it doesn't act like a rope when you click on any part. The bottom ball is constrained to its original location. how does one have free ends to simulate something like a hanging rope?
Re: P2P Questions (and answers hopefully)
Posted: Sat Jun 03, 2006 7:50 pm
by Erwin Coumans
bmud wrote:I'm going to kick off this with a question of my own. I opened up the demonstration file, attempted to make my own by copying the code into a file of my own. I imagine that documentation will take care of "you need a constraint variable for each axis for each object" blah blah.
I was planning to add a ConstraintActuator, that should make things much simpler. Also, Ramon (rcruiz) is working on setting up constraint within the Blender user interface.
Nevertheless, I noticed that if I use just the demo file, and delete everything except the white "rope" in the top-middle, it doesn't act like a rope when you click on any part. The bottom ball is constrained to its original location. how does one have free ends to simulate something like a hanging rope?
The python script that handles clicking applies the wrong impulse. Will be fixed. Also, you can just remove one constraint, if you want to have a free end to the rope. I'll provide a better rope demo.
Outta control!
Posted: Mon Jun 12, 2006 4:26 am
by bmud
I'd like to know if there's a way to reduce or eliminate the spinning in a chain of constrained pieces. Its no good to have the parts of a chain independently spinning length-wise all crazy-like.
if such a thing was possible, i don't think I'd be having nearly as much trouble with
this rope bridge
Posted: Mon Jun 12, 2006 7:53 am
by pildanovak
hello, you're only using 1 constraints per connection, which is no good

. look at the brige I made from yours here :
plant.ffa.vutbr.cz/~novak/dwnflz/constraints.blend
look in the script constraint.py, where are the constraints defined. I reduced the number of objects(was too much, better doing a bridge from more planks in row, than having separate objects for rope pieces, etc.) I was planning to add bridges to my game anyway, so at least I know how to code it now. Look also at the pivot definition, it's important, since it defines the point where the objects get connected...
Hey, I just probably helped my competitor!

Posted: Tue Jun 13, 2006 4:21 am
by bmud
That's very curious. Now I'm confused as to what a constraint actually IS. a point (defined in the code by a local x/y/z coordinate from its axis?) where.... it's simply... connected to another object? That makes probably the most sense.
I'll conquer it yet!
Posted: Tue Jun 13, 2006 9:59 am
by pildanovak
p2p means point to point constraint, so yes, it's connection of 2 objects with 1 point, for the bridge you could also use the hinge constraint, which is defined by an axis/common edge of the objects.