Gamestudio Links
Zorro Links
Newest Posts
Camera always moves upwards?
by NeoDumont. 02/17/26 15:40
Hedge on FXCM, 4 or 5?
by Martin_HH. 02/16/26 16:09
Zorro version 3.0 prerelease!
by jcl. 02/12/26 14:05
MarginCost discrepancy?
by jcl. 02/12/26 14:02
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (qin), 9,669 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[newton] Setting steering #73646
05/09/06 03:56
05/09/06 03:56
Joined: Sep 2003
Posts: 281
Arkansas\USA
raiden Offline OP
Member
raiden  Offline OP
Member

Joined: Sep 2003
Posts: 281
Arkansas\USA
Ok I keep getting: Crash in: NewtonSetTyreSteerParam. Not sure what I am doing wrong, but this is how I am trying to do it.

dllfunction NewtonSetTyreSteerParam (vehicleConst, tyreIndex, paramtricAngle);

Ok, 3 parameters, first I am creating 2 local variables in my ai car action like:
var FLTire;
var FRTire;


I use these to then get the vehicleConst parameter by doing this after my var defines:
FLTire = NewtonGetBody(p1FL_W);
FRTire = NewtonGetBody(p1FR_W);


I think this may be causing the issue, because a breakpoint before this tells me that FLTire & FRTire both = 0.

Ok, next parameter, in my left and right front tire actions, I have a call to: NewtonVehicleAddTyre(vehicleConst, my);, well it returns the tire index which is our next parameter to pass, so I set it like this:
p1FLTireIndex = NewtonVehicleAddTyre(vehicleConst, my);


A breakpoint before this gives me an index number for each tire.

Last parameter, paramtricAngle, I simply pass a value to set my new steering angle to.

So any clues anyone? I am thinking it's because I am not using the correct newton function to get the vehicle constraint for the tires, but I don't know what else to call to get the constraint for the tires.

Thanks

-raiden


"It doesn't matter if we win or lose, it's how we make the game."
--------------------
Links: 3DGS for Dummies
Re: [newton] Setting steering [Re: raiden] #73647
06/10/06 07:13
06/10/06 07:13
Joined: Sep 2003
Posts: 281
Arkansas\USA
raiden Offline OP
Member
raiden  Offline OP
Member

Joined: Sep 2003
Posts: 281
Arkansas\USA
Has anyone using Newtons been succesful with these functions:
Code:

// NewtonGetTyreSteerParam:
// Description: return the parametric steer angle for this tyre
// Parameters: vehicleConst
// tyreIndex
// remark:
dllfunction NewtonGetTyreOmega (vehicleConst, tyreIndex);
dllfunction NewtonGetTyreRadius (vehicleConst, tyreIndex);
dllfunction NewtonGetTyreInertia (vehicleConst, tyreIndex);
dllfunction NewtonGetTyreSteerParam (vehicleConst, tyreIndex);
dllfunction NewtonGetTyreNormalLoad (vehicleConst, tyreIndex);
dllfunction NewtonGetTyreLateralSpeed (vehicleConst, tyreIndex);
dllfunction NewtonGetTyreLongitudinalSpeed (vehicleConst, tyreIndex);


// NewtonGetTyreSteerParam:
// Description: return the parametric steer angle for this tyre
// Parameters: vehicleConst, tyreIndex, paramtricAngle
// remark:
dllfunction NewtonSetTyreSteerParam (vehicleConst, tyreIndex, paramtricAngle);
dllfunction NewtonSetTyreLateralFrictionCoef (vehicleConst, tyreIndex, frictionCoef);
dllfunction NewtonSetTyreLongituFrictionCoef (vehicleConst, tyreIndex, frictionCoef);
dllfunction NewtonSetTyreTorque (vehicleConst, tyreIndex, torque);



I tried using NewtonGetTyreOmega, but it crashes on me when the function calls. I am calling it like this:
tireSpeed = NewtonGetTyreOmega(my.myVehicleConstraint,0);

I get a crash in NewtonGetTyreOmega error. I am sure it is my parameters, but I don't know the correct ones.

Thanks

-raiden


"It doesn't matter if we win or lose, it's how we make the game."
--------------------
Links: 3DGS for Dummies

Moderated by  HeelX, Spirit 

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