Jump to content

#1
cassius

cassius
  • Members
  • 2,606 posts
Will it ever be possible to get a splashing effect when a character walks thru shallow water?

#2
gamecreator

gamecreator
  • Members
  • 1,875 posts
I think it's possible now.  I assume you're talking about the infinite water that comes with Leadwerks.  If you use that, it's generally safe to assume that your character is in water if its height is below the water height.  If you detect the appropriate height, you can apply whatever sound/particle effect/etc you'd like to at that time.

#3
cassius

cassius
  • Members
  • 2,606 posts
The problem would be how to check when character enters shallow water ( in code).

#4
gamecreator

gamecreator
  • Members
  • 1,875 posts
You compare the character Y position to your water height.

For example:
Pretend you set your water to a height of 10 in the editor.  That means that if the character Y position is 10 or below, it's touching water.  The lower it is, the further under water it is.  What you want to call shallow is up to you but you can say something like:

if(characteryposition<waterheight && characteryposition>waterheight-0.5) // character is in shallow water so run splash effect



#5
cassius

cassius
  • Members
  • 2,606 posts
That's good. Thanks.