kool-engine/kool

Question how do you build the race Track?

Opened this issue · 1 comments

arpu commented

Hello this is more a question i looked at the cool Demo at https://fabmax.github.io/kool/kool-js/
and i see the car glb 3d model but how do you create the Track?

The track is not loaded from a model but procedurally generated. It is defined by a few control points in VehicleDemo.makeTrack() (line 181 in VehicleDemo.kt )

The first Vec3f defines the position of the control point, the second Vec3f defines the direction in that point.

The control points are then used by the Track class to generate the actual geometry.