River Water in the BGE




How to Create flowing water in the BGE.

ThaTimst3r’s Post Processing Addon: https://drive.google.com/file/d/0B_DSg35urBhDeGtRaVpGU3RxME0/view?usp=sharing

FPS Template V2: https://drive.google.com/file/d/0B9SMh1EBaTriOEUxZldiX3pDYUU/view?usp=sharing&resourcekey=0-WK2zzqbfBuf6GR_MK-iVyg

Water Resource Pack: https://drive.google.com/file/d/0B9SMh1EBaTriUTNaQmlqbFJqX28/view?usp=sharing

All resources in the water resource pack are under the CC0 licence, so feel free to use them for whatever you need to, commercial and personal.

Script Credit: https://blenderartists.org/forum/showthread.php?367658-Animated-Texture-not-working

Feel free to ask questions in the comments, more tutorials coming soon.

#Script

import bge

cont = bge.logic.getCurrentController()
own = cont.owner

mesh = own.meshes[0]
verts = mesh.getVertexArrayLength(0)

for i in range(0, verts):
#get vertex
point = mesh.getVertex(0, i)
#get uv of vertex
uv = point.getUV()
#change [x,y]
uv[0] += own[‘x’]/1000
uv[1] += own[‘y’]/1000
#apply changes
point.setUV(uv)

Voir sur youtube

KA2Studio
Logo
Compare items
  • Total (0)
Compare
0