Roland Posted November 15, 2012 Share Posted November 15, 2012 Any suggestion for a good method of detecting if my character walks from land into water? Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Rick Posted November 15, 2012 Share Posted November 15, 2012 Can you check collision with the water plane? Quote Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted November 15, 2012 Share Posted November 15, 2012 or... (if you're using the default waterplane), some simple logic would be waterHeight=fw.renderer.waterHeight if(characterLoc.y > waterHeight) then character is walking on land.. if(characterLoc.y < waterHeight and characterViewLoc.y>waterHeight) then character is walking in water.. if(characterLoc.y < waterHeight and characterViewLoc.y<waterHeight) then character is swimming under water.. --Mike Quote Link to comment Share on other sites More sharing options...
Roland Posted November 16, 2012 Author Share Posted November 16, 2012 Thank's for the suggestions guys. Will test that tonight when I come home from work. Your are as usual awesome Quote Roland Strålberg Website: https://rstralberg.com 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.