Jump to content

Intersection Mask on Water Mesh


photo

Recommended Posts

Hello,

 

We are using intersection masks to control the height of an object but this doesn't seem to work for any water-type nodes/meshes. I can move the object along an axis and it will height adjust for terrain and meshes that are set with an intersection mask but it does not adjust position for any of the water meshes. I have verified this with a console log message as well, which triggers when over a regular mesh but not over a water mesh.

 

It is almost as if intersections do not work with water meshes, or cannot see them for any reason. Is this the case? Or am I missing something in my node setup?

 

Thanks!

Link to comment

Hi there, Taylor!

 

ObjectWater & ObjectWaterMesh will ignore collisions with physical objects as well ignore intersection requests, so you can't interact with water that way. You can use ObjectWater::getHeight and ObjectWaterMesh::getHeight functions by the way.

Link to comment

OK, is there another way to detect if a node is above or near an object/node?

 

It would be expensive to iterate through every ObjectWaterMesh in the world each update just to check for this, especially with a large world with many different bodies of water

Link to comment

Taylor,

 

You can use object bounding boxes and bounding spheres in order to do a quick test if objects are close to each other as well as compare object heights with that bounds.

Link to comment
×
×
  • Create New...