Hi all,
I have a b3d model of a terrain.
I would like to put grass on to it, but my problem
comes at the moment I'm going to read the triangle
in wich I'm going to place the grass with a linepick..
the piece of code is the next:
[...more code before...]
yt# = LinePick(x#,10,z#,0,-30,0)
yy# = PickedY#()
surf= PickedSurface()
tri = PickedTriangle()
v0 = TriangleVertex(surf,tri,0)
v1 = TriangleVertex(surf,tri,1)
v2 = TriangleVertex(surf,tri,2)
red#= VertexRed#(surf,v0)
green# = VertexGreen#(surf,v0)
blue# = VertexBlue#(surf,v0)
entitycolor grass_entity,red#,green#,blue#
The read values are always 255.0 in all the color components, and If I change the last line by
entitycolor grass_entity,0,0,0
it works!
I cannot understand what's I'm doing wrong or why
it doesn't return the good values..
Please HELP!!!!!
Thanks in advance!!
I have a b3d model of a terrain.
I would like to put grass on to it, but my problem
comes at the moment I'm going to read the triangle
in wich I'm going to place the grass with a linepick..
the piece of code is the next:
[...more code before...]
yt# = LinePick(x#,10,z#,0,-30,0)
yy# = PickedY#()
surf= PickedSurface()
tri = PickedTriangle()
v0 = TriangleVertex(surf,tri,0)
v1 = TriangleVertex(surf,tri,1)
v2 = TriangleVertex(surf,tri,2)
red#= VertexRed#(surf,v0)
green# = VertexGreen#(surf,v0)
blue# = VertexBlue#(surf,v0)
entitycolor grass_entity,red#,green#,blue#
The read values are always 255.0 in all the color components, and If I change the last line by
entitycolor grass_entity,0,0,0
it works!
I cannot understand what's I'm doing wrong or why
it doesn't return the good values..
Please HELP!!!!!
Thanks in advance!!