Terrain height painting with brush

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
wiedzmin112
Posts: 30
Joined: Tue Oct 18, 2011 3:48 pm

Re: Terrain height painting with brush

Post by wiedzmin112 »

Hmmm...I'm must think about this :) Thanks for replys and soory for off-topic :P
Katsankat
Posts: 178
Joined: Sun Mar 12, 2006 4:15 am
Contact:

Re: Terrain height painting with brush

Post by Katsankat »

Hey that's cool.
If you want to lower the terrain too, replace this line

Code: Select all

if(bp > 0 && hy+bp <= 255)
with

Code: Select all

if( hy+bp >0 && hy+bp <= 255)
The result of hy+bp should be placed in a temporary variable, just like brushWidth/2 which is called 6 times each pass :lol:
Post Reply