|
Ph_wheel constraint isn't working correct sometime
#74491
05/17/06 06:00
05/17/06 06:00
|
Joined: Sep 2004
Posts: 260 UB,Mongolia
Olzii
OP
Member
|
OP
Member
Joined: Sep 2004
Posts: 260
UB,Mongolia
|
Hi Marco, My car wheel's 's ph_wheel constraints goes crazy sometimes. Ph_wheel has some angle limits, but it will ignore it sometimes. You can see it here : a6 car (Please use left and right key to steer when car is stopped and it will happen. ) I was ok before at 6.314. I think it is from new physics improvements. Please tell me how to correct it. Is it a bug ? Olzii
The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
|
|
|
Re: Ph_wheel constraint isn't working correct some
[Re: Marco_Grubert]
#74493
05/18/06 07:32
05/18/06 07:32
|
Joined: Sep 2004
Posts: 260 UB,Mongolia
Olzii
OP
Member
|
OP
Member
Joined: Sep 2004
Posts: 260
UB,Mongolia
|
Here is code :
1. Constraint create you.wheelFL= phcon_add(PH_WHEEL, you, my); phcon_setparams1(you.wheelFL, my.x, vecUp, vecRight); phcon_setparams2(you.wheelFL, vector(0,0,0), nullvector, vector(you.suspensionERP, you.suspensionCFM,0));
2. Turning code my.targetSteer=clamp(my.targetSteer,-40,40); phcon_setparams2(my.wheelFL, vector(my.targetSteer,my.targetSteer,0), nullvector, vector(my.suspensionERP, my.suspensionCFM,0)); phcon_setparams2(my.wheelFR, vector(my.targetSteer,my.targetSteer,0), nullvector, vector(my.suspensionERP, my.suspensionCFM,0));
It does not matter that where is car creating. I have tried it.
Olzii
The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
|
|
|
Re: Ph_wheel constraint isn't working correct some
[Re: Olzii]
#74494
05/18/06 08:36
05/18/06 08:36
|
Joined: Sep 2004
Posts: 260 UB,Mongolia
Olzii
OP
Member
|
OP
Member
Joined: Sep 2004
Posts: 260
UB,Mongolia
|
Here is screenshots: It will happen when i press left or right key until wheel steering reaches maximum angle. It will not happen if i make maximum steering angle to 30. my.targetSteer=clamp(my.targetSteer,-30,30); // it is OK But steering angle 30 is not enough for car steering. Olzii
The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
|
|
|
Re: Ph_wheel constraint isn't working correct some
[Re: Olzii]
#74495
05/19/06 10:23
05/19/06 10:23
|
Joined: Sep 2004
Posts: 260 UB,Mongolia
Olzii
OP
Member
|
OP
Member
Joined: Sep 2004
Posts: 260
UB,Mongolia
|
Hi Marco,
You have requested code and i posted code and images. Why you dont answer ? May be i should write these questions on beta forum ?
Olzii
The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
|
|
|
Re: Ph_wheel constraint isn't working correct some
[Re: Olzii]
#74496
05/19/06 14:45
05/19/06 14:45
|
Joined: Jun 2004
Posts: 2,234 Wisconsin USA
FoxHound
Expert
|
Expert
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
|
Does this still happen with 6.40.5?
--------------------- There is no signature here.
QUIT LOOKING FOR ONE!
|
|
|
Re: Ph_wheel constraint isn't working correct some
[Re: FoxHound]
#74497
05/19/06 21:22
05/19/06 21:22
|
Joined: Sep 2003
Posts: 3,236 San Diego, CA
Marco_Grubert
Expert
|
Expert
Joined: Sep 2003
Posts: 3,236
San Diego, CA
|
Okay it seems that the PH_WHEEL does not like to be overly constrained. I am getting the same problem with 6.40.5 but it goes away when I change the code to this:
phcon_setparams2(my.wheelFL, vector(my.targetSteer-2,my.targetSteer+2,0), nullvector, vector(my.suspensionERP, my.suspensionCFM,0)); phcon_setparams2(my.wheelFR, vector(my.targetSteer-2,my.targetSteer+2,0), nullvector, vector(my.suspensionERP, my.suspensionCFM,0));
|
|
|
Re: Ph_wheel constraint isn't working correct some
[Re: Marco_Grubert]
#74498
05/20/06 04:16
05/20/06 04:16
|
Joined: Sep 2004
Posts: 260 UB,Mongolia
Olzii
OP
Member
|
OP
Member
Joined: Sep 2004
Posts: 260
UB,Mongolia
|
Wow, it goes away. Thanks Marco.
Why ? I dont understand purpose of adding +2, -2.
Olzii
The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
|
|
|
|