burakdogancay Posted December 31, 2019 Share Posted December 31, 2019 Hello everyone, I am looking for a function that calculates distance as an integer value from point(vec3) to point(vec3).I already searched and observed related function from Unigine::Geometry Class but unfortunately i couldn't find any function related to this subject. https://developer.unigine.com/en/docs/2.6/api/library/math/class.geometry?rlang=cpp#pointTriangleDistance_vec3_vec3_vec3_vec3_vec4_float Thank you in advance. Link to comment
arzezniczak Posted January 2, 2020 Share Posted January 2, 2020 (edited) You can substract those two points you have from each other, then get the result vector magnitude - this will give you the distance between those two points in float. Now you can round this value as you want (floor/ceil) and cast to integer. Edited January 2, 2020 by arzezniczak 2 Link to comment
Recommended Posts