taylormorris Posted June 9, 2015 Share Posted June 9, 2015 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
unclebob Posted June 10, 2015 Share Posted June 10, 2015 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
taylormorris Posted June 10, 2015 Author Share Posted June 10, 2015 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
unclebob Posted June 11, 2015 Share Posted June 11, 2015 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
taylormorris Posted June 12, 2015 Author Share Posted June 12, 2015 Hm, it will probably be more efficient to add a child node with an invisible duplicate mesh and check against that. Thanks! Link to comment
Recommended Posts