Hi there, I'm doing a raycast to determine which object the mouse is over. Once this is done, I want check the vertex closest to that point within the object.
To start off with, just to ensure I understand what I'm doing, once an object is clicked, I'm looping through all the vertices and drawing a line between hte objects transform and the vertex as below:
I dont understand the result I'm getting (the little bundle of read lines at the position of hte plane) - the 'shape' seems to be correct (the bundle of lines seem to be stretching towards each vertex), but come considerably short of reaching them. It looks as if I need to scale the vertex positions to get the result I'm after, but I don't understand why?
BTW I should add the solitary red line is the raycast.
Vertex positions are stored locally, relative to the object. You need to convert them to World Space.
I didnt read your entire post :) But im pretty sure this is what you want!
answered Apr 29 at 10:49 AM