Vehicle tire problem

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Vehicle tire problem

Postby Witek900 » Tue Jun 16, 2009 2:38 pm

Hi

I have problem with tires in Newton 1.53.

Here you have video:
http://www.youtube.com/watch?v=xIwg5KvHNXo

It looks like wheels are rotating around wrong axis. I think that I pass wrong offset matrix or pin vector to NewtonVehicleAddTire.
Pin vector is set to [1, 0, 0] (it's OK, because this 3 cars are placed along X axis) and offset matrix is translation matrix of vector [Tire position - vehicle position]. What do I wrong?
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Vehicle tire problem

Postby Julio Jerez » Tue Jun 16, 2009 2:53 pm

can you try pin {0, 0, 1}


I do not get why people keep using 1.53, there is a replacement
viewtopic.php?f=9&t=4922

here are two different car demos.
http://www.newtondynamics.com/downloads/atv_demo.rar
http://www.newtondynamics.com/downloads ... le_B19.rar

Please make the conversion to SDK 2.00, teh car joint are implemented as custom joint, which means you get to see the code and see what is going on.

I am not fixing errors in 1.53
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle tire problem

Postby Witek900 » Tue Jun 16, 2009 3:07 pm

Thx for fast reply.

When I set pin vector to (0, 0, 1) I get this:
http://www.youtube.com/watch?v=eYotGJEMJFw

But look that vehicle isn't "sinking" in the floor, all is ok (except drive direction)

I use Newton 1.53, because i can't use "JointLibrary" under Delphi. I even tried to construct car using joints like Hinge but then it was turning right (when wheels were cylinders) and left (when wheels were spheres or chamfer cylinders). However it should drive straight.
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Vehicle tire problem

Postby Julio Jerez » Tue Jun 16, 2009 3:26 pm

The car is correct now but it move sideway, try setting the front vector to (0, 0, 1) and the tire pin (1, 0, 0)
I believe it will work,
another alternative is to rotate the car geometry in your model editor so that the direction of travel is (1, 0, 0)

about 2.0 the joint library has a C interface, It is the same exact intecface I use for teh engine, you sould be able to convert the C header to delfi.
The gains you get from 2.0 are a lot, compared to 1.53 speciatly in performance.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle tire problem

Postby Witek900 » Tue Jun 16, 2009 3:41 pm

OK. I fliped geometry and set tire pin vector to (0, 0, 1) so everything is OK. Maby I'll convert Newton 2.0 Header from C to Delphi some day...

Thanks for help Julio.
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw

Re: Vehicle tire problem

Postby JernejL » Tue Jun 16, 2009 5:55 pm

Witek900 wrote:Maby I'll convert Newton 2.0 Header from C to Delphi some day...

Thanks for help Julio.


See last post here for delphi newton 2.0 header: viewtopic.php?f=9&t=806&start=120#p36179
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Vehicle tire problem

Postby Witek900 » Wed Jun 17, 2009 3:37 pm

Yes, i got it long time ago. I needed JointLibrary header to Delphi, but i've just converted it so I can use Vehicles in under Delphi in Newton 2.0 :D :D
Witek900
 
Posts: 38
Joined: Mon Jan 26, 2009 1:29 pm
Location: Warsaw


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 8 guests

cron