• 3D
  • Importing roadtrack and make it detect collision for driving on?

So I have been following these tutorials: https://youtube.com/watch?v=Yvy8vQ-5O_w for starting my car-game.

Now I don't want to make my racetrack that way, but in Blender. I currently just have a basic racetrack mesh which I have exported to gLTF (because I did the same thing with the car). I can place it in the scene, but then what? How do I make it so it has collision detection? I found this tutorial ( https://youtube.com/watch?v=hzPuWgkn6bE ) which makes the process of doing it in Blender and detect a collision shape automatically. But since I'm still learning, I do want to know how the manual process goes, in case I'm not able to do it as described in that video (which I haven't tested yet). I'm able to deduct that I have to go into the Spatial instance, where the mesh is. Add a StaticBody as a child of that mesh, and in turn add a CollisionShape as child of the StaticBody. But then what? In CollisionShape I want to select my mesh (.gLTF) again for the property Shape. But that doesn't seem to work. Can't I use the same mesh of the road as the collision shape?

Cheers

I got it imported by following the tutorial. Although I had my track 3x the width of my car in Blender, in-game it seemed like barely 2x the width (made sure the Transform scale was 1, 1, 1). This has me a bit worried for the designing process, if I what I make in Blender doesn't translate the same in-engine. And why does my car jump around with de collision mesh? The collision mesh is a derived simpler mesh from the original road.

See video: https://youtu.be/tnVq8yY4H1A

Ok, the traction and driving up hill has been fixed. Somebody on Youtube helped me out. Apparantly my collision mesh was too low in poly, so now I have kept the same amount of polygons for both the road and the collision mesh.

Still trying to figure out why the road seems so narrow in-game, while in Blender I can place 5 cars next to each other. In-game it's like I have just a bit of room to steer. And also don't know why I am not able to use gLTF for the road and collision shape in Godot, while gLTF works flawlessly for the car.

I'd check out the camera settings for starters, might just be that the road only looks narrow because of the camera fov/perspective distortion.

Also, since your road is just a fairly simple mesh and not a more complex rig, I'd use obj format for it instead.

@Megalomaniak said:

Also, since your road is just a fairly simple mesh and not a more complex rig, I'd use obj format for it instead. I'm currently using the .dae format for the road and gLTF for the car. I created a new road today, going to make it in sections. That one in the video was just to test how I could create a road in Blender and import it in Godot with collision.