Sign in to follow this  
Followers 0
cassius

splashing effect

5 posts in this topic

Will it ever be possible to get a splashing effect when a character walks thru shallow water?

0

Share this post


Link to post

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.

1

Share this post


Link to post

The problem would be how to check when character enters shallow water ( in code).

0

Share this post


Link to post

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

1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Create Your Account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0