cassius Posted February 28, 2017 Share Posted February 28, 2017 Will it ever be possible to get a splashing effect when a character walks thru shallow water? Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
gamecreator Posted February 28, 2017 Share Posted February 28, 2017 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 Quote Link to comment Share on other sites More sharing options...
cassius Posted March 1, 2017 Author Share Posted March 1, 2017 The problem would be how to check when character enters shallow water ( in code). Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
gamecreator Posted March 1, 2017 Share Posted March 1, 2017 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 Quote Link to comment Share on other sites More sharing options...
cassius Posted March 2, 2017 Author Share Posted March 2, 2017 That's good. Thanks. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.