Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 793 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
A8 PhysX motorized hinge? #338695
08/20/10 15:45
08/20/10 15:45
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline OP
Member
yorisimo  Offline OP
Member
Y

Joined: Mar 2007
Posts: 197
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


Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing
Re: A8 PhysX motorized hinge? [Re: yorisimo] #341264
09/13/10 21:03
09/13/10 21:03
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline OP
Member
yorisimo  Offline OP
Member
Y

Joined: Mar 2007
Posts: 197
Anyone?


Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing
Re: A8 PhysX motorized hinge? [Re: yorisimo] #341282
09/14/10 09:25
09/14/10 09:25
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
Apply a torque?

Re: A8 PhysX motorized hinge? [Re: Spirit] #341393
09/15/10 20:14
09/15/10 20:14
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline OP
Member
yorisimo  Offline OP
Member
Y

Joined: Mar 2007
Posts: 197
you can apply a torque to an entity but not to the hinge as far as I know (using pXent_addtorquelocal).


Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing
Re: A8 PhysX motorized hinge? [Re: yorisimo] #341419
09/16/10 09:34
09/16/10 09:34
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
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.

Re: A8 PhysX motorized hinge? [Re: ventilator] #341673
09/19/10 10:27
09/19/10 10:27
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
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.

Re: A8 PhysX motorized hinge? [Re: Spirit] #341820
09/20/10 20:02
09/20/10 20:02
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline OP
Member
yorisimo  Offline OP
Member
Y

Joined: Mar 2007
Posts: 197
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.


Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing
Re: A8 PhysX motorized hinge? [Re: yorisimo] #341959
09/22/10 09:26
09/22/10 09:26
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929

Re: A8 PhysX motorized hinge? [Re: Spirit] #342113
09/23/10 15:44
09/23/10 15:44
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline OP
Member
yorisimo  Offline OP
Member
Y

Joined: Mar 2007
Posts: 197
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.


Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1