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
2 registered members (TipmyPip, AndrewAMD), 12,726 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
[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