Collision with water

How to check Collison with water

Plz help i am a noob on scripting

Hi, welcome to the forum!

How you detect a collision with the water will depend on what you need to do. However, in most cases you will probably want to set the water plane’s collider to be a trigger and add an OnTriggerEnter function to its script. Whenever an incoming object touches the water, the OnTriggerEnter function will be called. This will often work better if you add a rigidbody to the water object (with the Is Kinematic option switched on) and change the plane’s default mesh collider for a thin box collider.

Thanks