|Topic was automatically imported from the old Question2Answer platform.
I have been trying to build a motorbike racing game and have struggled with trying to use the ‘Vehicle Body’ and ‘Wheel Body’ and everything I have tried has not worked (the bike kept swaying like a boat on the ocean).
So I have moved onto using ‘Kinematic Body’. The issue I am having hear is that the bike does not follow the road surface correctly
I have tried using two collision shapes, one for each wheel, however, the appears to be only using the rear wheel collision shape.
Any help would be greatly appreciated.
I may be wrong, however with a KinematicBody, I believe the physics engine will not calculate how your body moves - it will just move in the direction you specify and identify collisions. Your code needs to handle those collision (for example a tyre contacting the road).
So, you will need to rotate the bike to align with the track. The get_floor_normal method will give you the slope of the road at the last collision point. You might need to model each wheel as a Kinematic body to give you two touch points…?
This tutorial is really good
AndyCampbell | 2020-11-17 02:18
Thank you very much for the information and pointing me in the right direction.
Manx191 | 2020-11-23 11:15