Dynamic Mesh Creation

Blitz3D Forums/Blitz3D Programming/Dynamic Mesh Creation

Jeremy Alessi(Posted 2004) [#1]
I'm trying to modify the code in the tron demo so that it will lay out the mesh for skid marks (so it's not a thin vertical line, but instead a flat think patch of rubber). I'm using TFormPoint() but I'm getting some strange results where the mesh isn't positioned by the bike ... but rather way out far from the center of the world ... although it still follows the movement of the bike ... but the marks aren't always as I want them ... being wide that is ... sometimes they thin out ... it's strange. Any help would be much appreciated.

I'm not even really sure if this is the best method for skid marks. But I want to try this and texture painting ... but that I have to wait for some new models with a special UV set.


Stevie G(Posted 2004) [#2]
Modified the add_flag section - should work ..

If add_flag
		TFormPoint -1,.01,0,bike, 0
		AddVertex trail_surf,TFormedX(),TFormedY(),TFormedZ()
		TFormPoint 1,.01,0,bike,0
		AddVertex trail_surf,TFormedX(),TFormedY(),TFormedZ()
		AddTriangle trail_surf,trail_vert,trail_vert+2,trail_vert+3
		AddTriangle trail_surf,trail_vert,trail_vert+3,trail_vert+1
		AddTriangle trail_surf,trail_vert,trail_vert+3,trail_vert+2
		AddTriangle trail_surf,trail_vert,trail_vert+1,trail_vert+3
		trail_vert=trail_vert+2
	Else
		TFormPoint 1,.01,0,bike,0
		VertexCoords trail_surf,trail_vert,TFormedX(),TFormedY(),TFormedZ() 
		TFormPoint -1,.01,0,bike, 0
		VertexCoords trail_surf,trail_vert+1,TFormedX(),TFormedY(),TFormedZ()
	EndIf




Jeremy Alessi(Posted 2004) [#3]
Oh duh!

I did:

TformPoint(EntityX(bike).... , bike, 0)

DOH!


Vorderman(Posted 2004) [#4]
Oh, I've just posted about this exact method in the other thread...