Ok I can load teh demos know isther a way to navegate?
when I run teh test 17 I see teh car loaded, it falls down bu I do no see where it lad because I do not know how to move
I tryed few keys but nohing happens.
Moderator: Alain
action newton_car()
{
NewtonBody* car_body = newton_addentity(me, 130, NEWTON_CONVEXHULL, onforceandtorque);
float tire_offset[16] = {0,1,0,0, 0,0,1,0, 1,0,0,0, 0,0,0,1};
NewtonJoint* car_joint = DGRaycastVehicleCreate(4, tire_offset, car_body);
DGRaycastVehicleAddTire(car_joint,NULL,vector(5,-5,-1), 0.5, 0.1, 1, 0.1, 0.25, 70, 5, 1);
DGRaycastVehicleAddTire(car_joint,NULL,vector(5,5,-1) , 0.5, 0.1, 1, 0.1, 0.25, 70, 5, 1);
DGRaycastVehicleAddTire(car_joint,NULL,vector(-5,5,-1), 0.5, 0.1, 1, 0.1, 0.25, 70, 5, 1);
DGRaycastVehicleAddTire(car_joint,NULL,vector(-5,-5,-1), 0.5, 0.1, 1, 0.1, 0.25, 70, 5, 1);
while(me!=NULL)
{
DGRaycastVehicleSetCustomTireTorque(car_joint,1,1500);
DGRaycastVehicleSetCustomTireTorque(car_joint,0,1500);
camera_func();
wait(1);
}
}
action Newton_Car()
{
int tireMass = 30;
float suspensionLength = 0.25;
float suspensionSpring =700.0;
float suspensionShock = 60.0;
float wheelradius = 0.4;
float tirePin[3] = {0.0, 1.0, 0.0};
D3DXMATRIX tire_offset;
VECTOR tirepos;
car = me;
wait(3);
NewtonBody* car_body = newton_addentity(me, 1000, NEWTON_CONVEXHULL, onforceandtorque);
// NewtonBodySetAutoFreeze( car_body, 0);
NewtonBodySetLinearDamping(car_body,0.005);
float upDir[3] = {0.0, 0.0, 1.0};
float frontDir[3] = {0.0, 0.0, 1.0};
// NewtonJoint* car_joint = CreateCustomMultiBodyVehicle(frontDir[0], upDir[0], car_body);
FLwheelPtr = ent_create("tekerlekL.mdl",nullvector,NULL);
FRwheelPtr = ent_create("tekerlekR.mdl",nullvector,NULL);
BLwheelPtr = ent_create("tekerlekL.mdl",nullvector,NULL);
BRwheelPtr = ent_create("tekerlekR.mdl",nullvector,NULL);
}
action Newton_Car()
{
NewtonBody* car_body = newton_addentity(me, 130, NEWTON_CONVEXHULL, onforceandtorque);
float tire_offset[16] = {0,1,0,0, 0,0,1,0, 1,0,0,0, 0,0,0,1};
NewtonJoint* car_joint = DGRaycastVehicleCreate(4, tire_offset, car_body);
DGRaycastVehicleAddTire(car_joint,NULL,vector(5,-5,-1), 0.5, 0.1, 1, 0.1, 0.25, 70, 5, 1);
DGRaycastVehicleAddTire(car_joint,NULL,vector(5,5,-1) , 0.5, 0.1, 1, 0.1, 0.25, 70, 5, 1);
DGRaycastVehicleAddTire(car_joint,NULL,vector(-5,5,-1), 0.5, 0.1, 1, 0.1, 0.25, 70, 5, 1);
DGRaycastVehicleAddTire(car_joint,NULL,vector(-5,-5,-1), 0.5, 0.1, 1, 0.1, 0.25, 70, 5, 1);
while(me!=NULL)
{
DGRaycastVehicleSetCustomTireTorque(car_joint,1,1500);
DGRaycastVehicleSetCustomTireTorque(car_joint,0,1500);
camera_func();
wait(1);
}
}
Leadwerks wrote:-Position the chassis at 0,0,0 with no rotation (0,0,0) when you first attach tires.
-Make sure the chassis mass is set before you add any tires.
-Specify the exact number of tires you need in the vehicle create function. Don't specify extras you won't use.
-Use the get tire matrix command to position some wheel meshes so you can see where the tires are and how they are oriented.
If you don't follow the first three tips, your vehicle may bounce around uncontrollably, or you may have other unexpected results.
Users browsing this forum: No registered users and 11 guests