Vehicle problem

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Vehicle problem

Postby Witek900 » Mon Jun 22, 2009 5:03 pm

Hi

I have problem with vehicles. I create 9 the same vehicles (CustomMultiBodyVehicleAddTire, CustomMultiBodyVehicleGetTireBody, CreateCustomMultiBodyVehicle) with 4 wheels and they are falling on the floor. When i set SolverModel and FrictionModel to 0, all vehicles fly away faster than light. But when i set SolverModel and FrictionModel to 1 only few of then fly away (always the same cars). I don't aply any forces, torques, steering angles. It all happens in Turbo Delphi, while in Delphi 7 i have Access Violation and debuger shows me an error in some NewtonBodyCalculateinverseDynamicsForce (on CPU log) :?: Any ideas?
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Vehicle problem

Postby Witek900 » Mon Jun 22, 2009 6:29 pm

I solved it. When I set userData in CustomMultiBodyVehicleAddTire to "nil" it's OK, but only on SolverModel and FrictionModel > 0. When they equals 0, all tires are jumping (moving very fast along Y axis up and down)
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Vehicle problem

Postby Julio Jerez » Mon Jun 22, 2009 6:42 pm

Witek900 wrote:Hi
I have problem with vehicles. I create 9 the same vehicles (CustomMultiBodyVehicleAddTire, CustomMultiBodyVehicleGetTireBody, CreateCustomMultiBodyVehicle)

The CustomMultiBodyVehicle has not being polished yet, Daved Gravel is makig a demostration and it will be on with Beta 2.03
I will try to make the interface for both RayCast and Mutibody car very simular so that swtiching is very simple.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle problem

Postby Witek900 » Tue Jun 23, 2009 4:30 pm

I have still bugs (in Newton 2.03). I have seen that if delta time is bigger, cars are jumping more. When i set my graphics quality to high and i have less FPS, wheels are juming crazily. But when i have 500 FPS, everything is ok. and of course on FrictionModel=0 and Solvermodel=0 wheels are jumping always (even when it is 1000 FPS).
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Vehicle problem

Postby Julio Jerez » Tue Jun 23, 2009 4:35 pm

Is this the RayCast Car?

The SDK runs at 60 FPS and the car are stable. You most have som ecrazy spring values for the suspensions.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle problem

Postby Witek900 » Tue Jun 23, 2009 5:18 pm

no, i just create car using CreateCustomMultiBodyVehicle from JointsLibrary.dll.

Car's mass = 1300

I add tire using this:
TIndex := CustomMultiBodyVehicleAddTire(VehicleJoint, nil, @LocalPos[0], 10, 0.36, 0.34, 0.4, 70, 10);
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Vehicle problem

Postby Julio Jerez » Tue Jun 23, 2009 5:37 pm

I will repeat the message.
Julio Jerez wrote:
Witek900 wrote:Hi
I have problem with vehicles. I create 9 the same vehicles (CustomMultiBodyVehicleAddTire, CustomMultiBodyVehicleGetTireBody, CreateCustomMultiBodyVehicle)

The CustomMultiBodyVehicle has not being polished yet, Daved Gravel is makig a demostration and it will be on with Beta 2.03
I will try to make the interface for both RayCast and Mutibody car very simular so that swtiching is very simple.


MutiBodyCar is a complex joint, that requires some post processing.
Dave Gravel is polishing it and getting to work really nice, I am letting him to finish it off since he have a lot more experiment than I do with making Car driving games.
Masking a stable multibodycar joint is not really a problems, Making one that is stable, easy to use, and fun to drive, and that do not get stuck, is the hard part and that is where David is making a contribution. Soon we will put the Demo with the Next SDK 2.03 with a working car demo.

Until then I suggest you do no waste time on it because you may be fighting a bug, that you may not be aware about.
Is there a reason you can no try the RayCast Car for the time being?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle problem

Postby Witek900 » Tue Jun 23, 2009 5:52 pm

I can't import CustomDGRayCastCar class form Jointlibrary.dll to Delphi

EDIT: i haven't seen DGraycastVehicle... functions. :D Sorry. I'll try this
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Vehicle problem

Postby Julio Jerez » Tue Jun 23, 2009 6:01 pm

Witek900 wrote:DGraycastVehicle... functions. :D Sorry. I'll try this

yes that's the one, It is the one in the demos, and It come swith a C inteface, you should be able to get it in Delfi
Also Made sure you download 2.03 I just made a fix on that joint
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle problem

Postby Witek900 » Tue Jun 23, 2009 6:24 pm

With which function i can get tire matrix?
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Vehicle problem

Postby Julio Jerez » Tue Jun 23, 2009 7:04 pm

JOINTLIBRARY_API void DGRayCarTireMatrix(NewtonCustomJoint *car, int tire, dFloat* tireMatrix);
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle problem

Postby Witek900 » Tue Jun 23, 2009 7:20 pm

Thanks Julio. Car doesn't jupm, even on SolverModel = 0.
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Vehicle problem

Postby Julio Jerez » Tue Jun 23, 2009 7:54 pm

Cool does it drive?
How about a costesy video to see what you got?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle problem

Postby Dave Gravel » Wed Jun 24, 2009 1:56 am

If the car jumping it can come from the suspenssion lenght if the value is so close.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Vehicle problem

Postby Witek900 » Wed Jun 24, 2009 7:33 am

http://www.youtube.com/watch?v=UDjIDQwDm20

How to get tire rotoation speed?
And what makes functions DGRaycastVehicleGenerateTires... ?
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Next

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 5 guests

cron