changing PH_HINGE limits with pXcon_setparams2

Posted By: HeelX

changing PH_HINGE limits with pXcon_setparams2 - 09/22/11 20:00

Hi,
I set for my PH_HINGE entity boundaries like this:
Code:
pXcon_setparams2(entity, vector(-5,5,0), NULL, NULL);


So, it is a relative rigid hinge constraint. At some point of time I want to free this constraint, I then use
Code:
pXcon_setparams2(entity, vector(-360,360,0), NULL, NULL);



When I call pXcon_getposition, I get the upper and lower bounds, and I can see, that they change from +/- 0.087 -> +/- 3.141 as I wished, but no matter how I turn my hinge entity, I can't overcome the old limit of +/- 0.087 --- it looks like you set the new bounds properly, but it is not transmitted into the physics simulation?.

I tried to check the PhysX source, but it was too obfuscated there and I don't know PhysX at it's core very much, so I am sorry for not finding something there smile

P.S: please see this as well
Posted By: jcl

Re: changing PH_HINGE limits with pXcon_setparams2 - 09/23/11 08:08

Thanks - we'll look into this.
Posted By: HeelX

Re: changing PH_HINGE limits with pXcon_setparams2 - 09/23/11 15:51

Thank you very much. It would be very nice if you could fix this for the release of A8.31 smile
Posted By: PadMalcom

Re: changing PH_HINGE limits with pXcon_setparams2 - 02/23/12 09:04

The manual says "Please note that in the current PhysX version, angle limits can only be set once, and not modified afterwards."

Does this still hold? HeelX's post sounds like it doesn't.
Posted By: jcl

Re: changing PH_HINGE limits with pXcon_setparams2 - 02/23/12 10:13

It still holds. It's apparently not going to be fixed and there is no simple workaround, so we have to live with that. For new limits, the hinge must be recreated.
Posted By: HeelX

Re: changing PH_HINGE limits with pXcon_setparams2 - 02/23/12 13:09

Yes, that can't be done with PhysX 2.x.

For my phyiscs project I needed that behaviour to "freeze" a joint and re-open it. Then I waived that behavior and did something more stable, though: adding a second, fixed dummy constraint.

That is not possible with the original Gamestudio plugin, though. You can not manage more than one joint between two entities and the "fixed" constraint is not supported there (although you can build one with 6D joints, I think). Though, I added that to the community plugin some time ago.
© 2024 lite-C Forums