Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 17,416 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
PH_SLIDER, inversed axis limits #384626
10/05/11 14:19
10/05/11 14:19
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Hi,
I noticed, that when you define a slider axis, that you have to inverse the limits, e.g. if the entity is at 0,0,0 and the axis is defined as 1,0,0, and you want that it just slides between x=0...64, passing vector(0,64,0) to setparams2 doesn't work, you have to pass vector(-64,0,0), because in the PhysX plugin code you do this:

Code:
cylindricalJoint->addLimitPlane(-gAxis, gAnchor + _FLOAT(limit_angles->y)*PhX.NXSize*gAxis,_FLOAT(limit_angles->z)*0.01f);
cylindricalJoint->addLimitPlane(gAxis, gAnchor + _FLOAT(limit_angles->x)*PhX.NXSize*gAxis,_FLOAT(limit_angles->z)*0.01f);



where you obviously use the second argument (limit in axis direction) together with the -inversed- axis and vice versa.

This is not only counter-intuitive, but also wrong compared to what is stated in the manual:

Quote:
Allowed distance from original position, e.g. (-100, 1000, 0) allows the objects to slide apart by 1000 quants along the axis and 100 quants in the opposite direction, thus giving a total range of 1100 quants.


Best regards,
-Christian

[EDIT] And the manual doesn't state what happens with the .z parameter, as you obviously use it, see limit_angles->z in the above snippet... what is it?

Last edited by HeelX; 10/05/11 14:23.
Re: PH_SLIDER, inversed axis limits [Re: HeelX] #384896
10/10/11 07:37
10/10/11 07:37
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Thanks, we'll check that. I think that inversing the limits dependent on the axis direction could be a normal behavior of PhysX.

Re: PH_SLIDER, inversed axis limits [Re: jcl] #384902
10/10/11 07:58
10/10/11 07:58
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I already changed that in the SourceForge repository so that t behaves like it is said in the documentation.

Re: PH_SLIDER, inversed axis limits [Re: HeelX] #395327
02/22/12 14:17
02/22/12 14:17
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
FYI this is fixed:

Limits to PH_SLIDER were swapped (all A8 versions; fixed in 8.30.4).


Moderated by  jcl, Nems, Spirit, Tobias 

Gamestudio download | 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