Make a curve...

Blitz3D Forums/Blitz3D Programming/Make a curve...

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I've done something similar, but I created the mesh programmatically instead of using a pre-made mesh. This makes it easier to deal with the vertices since you create them yourself and know the order they're in.

I assume you will want to assign UV coordinates to your road section too, so that no matter how it bends, the road texture sticks to it.

It's fairly complicated to explain without some code examples, so I'm sorry if I just confused you further.

Hints: Cos, Sin, CreateMesh, CreateSurface, AddVertex. You'll need your start and end angle of the curve, as well as the radius.

BTW, do you really need to deform it in realtime, or a one-time deformation during runtime of the game?