supercar demo ported vehicle moving sidewards

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

supercar demo ported vehicle moving sidewards

Postby Lax » Mon Jun 03, 2024 2:47 am

Hi Julio, Dave,

I know I'm asking a question regarding old Newton 3.x version, but its just a math question.

I ported the supercar demo to my Engine using OgreNewt. Everything works fine, but the model local axis is rotated by 90 degree (model axis vector is 1 0 0 instead of 0 0 1). Blender has exported the mesh model in that direction.

Now if I drive the car, the car is moving sidewards. Like in the video below:

https://www.youtube.com/watch?v=gkfW3-XogV8&ab_channel=LukasKalinowski

How can I rotate the model vector, so that the car will be moving forward? Its hard to intervene in all those algorithms, which are used in the supercar demo.

Do you have an idea?

Best Regards
Lax
Please support SecondEarthTechnicBase built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd17-5ff5-40a0-ac6f-44b97b79be62
Image
Lax
 
Posts: 182
Joined: Sat Jan 08, 2011 8:24 am

Re: supercar demo ported vehicle moving sidewards

Postby Dave Gravel » Wed Jun 05, 2024 5:35 pm

I think the easiest way to fix that is to rotate the vehicle in Blender and save it rotated. Just rotate the meshes in the correct direction and apply the rotation and other transformations before exporting it.
I think you need to take care of the barrel's center position too because it can cause problems with the suspension and mass center. It depends on your mesh loader, if I'm not wrong.

https://orionx3d.sytes.net/Screenshot%202024-06-05%20172955.png
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: 801
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: supercar demo ported vehicle moving sidewards

Postby Lax » Fri Jun 07, 2024 3:24 am

Hi Dave,

ok, at the end, I think the same way as you.
I first thought, it cannot be that hard, to rotate everything in the algorithm correctly, but it seems more complicated as I thought. Hence I will rotate the models properly in blender.

Thanks for your answer!

Best Regards
Lax
Please support SecondEarthTechnicBase built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd17-5ff5-40a0-ac6f-44b97b79be62
Image
Lax
 
Posts: 182
Joined: Sat Jan 08, 2011 8:24 am

Re: supercar demo ported vehicle moving sidewards

Postby JoshKlint » Thu Aug 15, 2024 11:01 am

Do you have a more abstracted implementation of this code? I have been meaning to port it into our engine for ages, but it is very intertwined with a lot of other things in the example.
JoshKlint
 
Posts: 184
Joined: Sun Dec 10, 2017 8:03 pm

Re: supercar demo ported vehicle moving sidewards

Postby Lax » Tue Aug 20, 2024 5:19 am

Hi,

unfortunately not. I orientated on the newton dynamics sandbox samples.
The best would be todo the same thing for your engine: debug the example of the sandbox and adapt for your engine.

One hint: CollisionHull Capsule does work the best for creating car's for smooth movement on rough ground.

Best Regards
Lax
Please support SecondEarthTechnicBase built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd17-5ff5-40a0-ac6f-44b97b79be62
Image
Lax
 
Posts: 182
Joined: Sat Jan 08, 2011 8:24 am

Re: supercar demo ported vehicle moving sidewards

Postby JoshKlint » Sun Aug 25, 2024 11:22 am

Thanks for the tip!
JoshKlint
 
Posts: 184
Joined: Sun Dec 10, 2017 8:03 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron