A8 PhysX motorized hinge?

Posted By: yorisimo

A8 PhysX motorized hinge? - 08/20/10 15:45

Since there is no phcon_setmotor equivalent function in A8 how do we motorize a hinge in A8?

I posted the same question with more detail a week ago here:
A7->A8 Ragdoll Post
Posted By: yorisimo

Re: A8 PhysX motorized hinge? - 09/13/10 21:03

Anyone?
Posted By: Spirit

Re: A8 PhysX motorized hinge? - 09/14/10 09:25

Apply a torque?
Posted By: yorisimo

Re: A8 PhysX motorized hinge? - 09/15/10 20:14

you can apply a torque to an entity but not to the hinge as far as I know (using pXent_addtorquelocal).
Posted By: ventilator

Re: A8 PhysX motorized hinge? - 09/16/10 09:34

applying a torque often isn't enough though. to get a well behaving motor you could try to simulate something like a servo or a pid controller.
Posted By: Spirit

Re: A8 PhysX motorized hinge? - 09/19/10 10:27

AFAIK all physics engines only apply torque through motorized joints, and a maximum velocity. This works the same way for ODE and PhysX. More complex control can be done by the application I think, by adjusting the torque dependent on the rotation speed.
Posted By: yorisimo

Re: A8 PhysX motorized hinge? - 09/20/10 20:02

Yes, that's what phcon_setmotor did in ODE within A7. Actually this function attempts to get the hinge to a specified angular velocity given a maximum torque.
But I don't see a similar function in PhysX within A8.
Posted By: Spirit

Re: A8 PhysX motorized hinge? - 09/22/10 09:26

http://manual.3dgamestudio.net/pXent_addtorquelocal.htm

http://manual.3dgamestudio.net/pXent_setmaxspeed.htm

Should do the same as phcon_setmotor in ODE.
Posted By: yorisimo

Re: A8 PhysX motorized hinge? - 09/23/10 15:44

Spirit,

Adding Torque to a body will not result in the same affect as applying it at the joint. I'll give the example of a simulated elbow. The elbow has a limited range of motion of about 0-140 deg. If you are applying an external flexion torque to the forearm the elbow will flex, and the upper arm will remain motionless. When the elbow reaches 140 deg, the forearm torque will now cause rotation around the shoulder causing the upperarm to go up.
In actuality, the upper arm should, (if no resistive torque is applied at the shoulder), swing back slightly as the forearm goes up (as the center of gravity of the arm changes). When the elbow reaches 140 deg, the torque will not get transferred to the shoulder because it is internally driven not referenced to an externally applied torque.

The NVIDIA PhysX Manual, the revolute (hinge) joint has a motor parameter but I don't know how to access it from A8. I'm hoping that JCL is planning on adding lots more of the PhysX functionality to A8.
© 2024 lite-C Forums