I want to get the surface of an entity so I can read out the VertexX, etc.
When I was using miniB3d I cast lyne_surf = GetSurface( TMesh(lyne), 1 ) and it worked fine.
But Blitz3D does not allow this, and it throws up a MAV on the TFormPoint line.
Help. :-)
lyne = Make_Line_No_Triangles( ship\constant, A_Ref_Ship(ship\constant)\A_Lines_V0[kk], A_Ref_Ship(ship\constant)\A_Lines_V1[kk] , scale)
lyne_surf = GetSurface( lyne, 1 )
;vertices
;--------
For vert% = 0 To 12-1
TFormPoint VertexX(lyne_surf, vert), VertexY(lyne_surf, vert), VertexZ(line_surf, vert), lyne, 0 ; To the real world
VertexCoords all_lines_surface, kk*12 + vert, TFormedX(), TFormedY(), TFormedZ()
Next
Should work fine, assuming at least 12 verts have been created. I would check countvertices for that surface. You sure it's not the line below? Curious as to why you need 12 verts for a 3d line too?
Hi Stevie,
12 verts to make a hexa-line.
Should work but it does not.
Would you like a look at the whole source?
Thanks, Jim.
Hi, found the error :-[
TFormedZ was using line_surf where it should have been lyne_surf.
I did your countvertices and it was 12 then I saw the variable line_surf and realised ........
Thanks again, Jim.
Interesting concept - hex lines. Is this for 3d wireframe? Any screenshots?
Hi, yes essentially the same as a one surface particle system but I'm drawing lines.
Beauty is I can update a ship a line at a time, or 4, or any number really.
I need to scale the lines depending on distance but want to avoid an entity for each line.
Here's a little demo of a craft.
https://www.youtube.com/watch?v=vSWWBrqUTTk (https://www.youtube.com/watch?v=vSWWBrqUTTk)
Jim.
Quote from: JBR on June 12, 2020, 20:30:40
Hi, yes essentially the same as a one surface particle system but I'm drawing lines.
Beauty is I can update a ship a line at a time, or 4, or any number really.
I need to scale the lines depending on distance but want to avoid an entity for each line.
Here's a little demo of a craft.
https://www.youtube.com/watch?v=vSWWBrqUTTk (https://www.youtube.com/watch?v=vSWWBrqUTTk)
Wow this looks very cool! Reminds me of Elite. What are you planning to do with this?
Hopefully a game similar to the Elite style but more combatant.
Jim.
Loving the vectors!