*old post from an old blog (posted Jan. 25 2010)
This is for the people who tried to follow the instructions given on the bzflag wiki.
Some of you may have tried to make a mesh in this way, but found that some of the sides acted like they didn't exist in certain directions. What you may not realize is the wiki is right, and it will work. What you don't realize is that it is quite easy to fix. the mesh face will face the direction in which the vertex winding order is counter-clockwise.
example:
a box like mesh, in which the "[]" is a vertex. Vertices 0-3 have a z value of 0, while vertices 4-7 have a z value of 15. the x and y value do not matter right now.
(0/4) (1/5)
[]=====[]
|#######|
|#######|
[]=====[]
(3/7) (2/6)
North is the direction up here in this page.
Example face of this mesh
(if you want the top face to face north this is how it is done)
The top face is in zeros and ===
face
vertices 0 4 5 1
matref your_matref
endface
(this next face is if you want the same face to show south, which would be toward all of the "#'s")
face
vertices 0 1 5 4
matref your_matref
endface
(now you know how to make a face)
(a face like the previous one would have no effect on tanks or their projectiles that view it from north) aka the face would face the center of the mesh
No comments:
Post a Comment