Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Martin_HH, TipmyPip), 1,279 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 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 | 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