![]() |
GetClosestNormal - Printable Version +- tyFlow Forum (https://forum.tyflow.com) +-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html) +--- Forum: Bugs and Issues (https://forum.tyflow.com/forum-3.html) +--- Thread: GetClosestNormal (/thread-2844.html) |
GetClosestNormal - nayan - 01-12-2022 Hey there I am not good with code, so I might be wrong but somehow GetClosestNormal is working and not working......working in the sense, that I am getting the correct normal vector, but the magnitude is coming out wrong, coz normal vectors are showing close to origin. I am also attaching the file for checking normal vectors and magnitude Please do check Thank you Nayan Bodawala RE: GetClosestNormal - tyFlow - 01-12-2022 Hi Nayan, Normals are always unit vectors (length = 1). If you want to display them relative to their surface location, just add the position of the surface element (ex: vertex) to them. So in your code, just change to: Code: DrawLine(pPos,pPos+Nrm,255,255,255); RE: GetClosestNormal - nayan - 01-13-2022 Yeah, I did that to my file.......What was running in my head was that GetClosestNormal(point) will not only get the normal vector but will also offset to the point position from origin...... anyways thanks for the clarification |