Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Nymphodora), 485 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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 | 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