The script can be used for multiple objects or so, just make sure to call “Build.start” in a Python controller in module mode, and use a little bit of nodes to get the vertex alpha value to work correctly.
Good job, man!
And can you make in the properties of the object another parameter - the direction (False, True)? To change - whether the object disappears, or appears.
if VList not in own:
VList =[]
for vert_index in range(obj.meshes[0].getVertexArrayLength(0)):
VList.append(vert_index)
own['VList']=VList
owb['running'] =[]
else:
popList =[]
for vert_index in own['VList']:
vert = obj.meshes[0].getVertex(0,vertex_index)
if obj.worldTransform*vert.xyz.z <own['floor']:
own['running'].append(vert)
pop2=[]
index =[]
for vert in own['running']:
if vert.color[3] < .95:
vert.color[3]+=.05
else:
pop2.append(index)
still missing a bit* will finish when I get a chance.
That’s a bit more than just “switching to object local space” lol
Anyway, this effect is pretty damn cool ! But at this point you would better write your own GLSL material shader I think
It would be easier to export, you could also get rid of animation key frames on the obj color (using uniform variables), and might even be compatible with vanilla BGE !
you don’t have access to object color node in the node editor though or the time node… making animation inconvenient as you have no uniforms to drive them