a.koryakin Posted November 6, 2014 Share Posted November 6, 2014 Hi, I'm using unigine v1 and I have a problem with finding intersection with terrain. I want to get intersection point coordinates. using method: ObjectPtr getIntersection(const UNIGINE_VEC3 & p0, const UNIGINE_VEC3 & p1, int mask, int & ret_surface) this methd returns ObjectPtr, but i need exact point of intersection terrain(surface) with line (p0, p1).is there such method?Thanx. Link to comment
silent Posted November 6, 2014 Share Posted November 6, 2014 Hi, I'm afraid the only analog in Unigine 1 is to use UnigineScript functions: ObjectTerrain::getIntersection(): http://old-docs.developer.unigine.com/scripting/library/objects/class.objectterrain#getIntersection_vec3_vec3_int_int_int_int engine.world.getIntersection(): http://old-docs.developer.unigine.com/scripting/library/engine/engine.world#engine.world.getIntersection_vec3_vec3_int_int engine.world.getIntersection(): http://old-docs.developer.unigine.com/scripting/library/engine/engine.world#engine.world.getIntersection_vec3_vec3_int_int_int In the first case you will be able to get local terrain coordinates, so you will need to convert them into world. Sorry for the inconvenience. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts