A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by 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=LukasKalinowskiHow 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
-
Lax
-
- Posts: 182
- Joined: Sat Jan 08, 2011 8:24 am
by 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
-

Dave Gravel
-
- Posts: 801
- Joined: Sat Apr 01, 2006 9:31 pm
- Location: Quebec in Canada.
-
by 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
-
Lax
-
- Posts: 182
- Joined: Sat Jan 08, 2011 8:24 am
by 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
-
by 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
-
Lax
-
- Posts: 182
- Joined: Sat Jan 08, 2011 8:24 am
by 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