- Home /
Question by
Chaosgod_Esper · Dec 17, 2014 at 09:13 AM ·
raycastmeshpositionquad
Get Vertice of a Quad (two tris) via raycast?
Hi there..
I create a mesh via this Script: http://pastebin.com/AWAAawhP
Now i want to use a Raycast from the Camera to Cursor, to get Quad on this "Terrain". So, i get a Triangle, wich has 3 vertices. That´s okay, unity uses tris.
This is my Script for that: http://pastebin.com/xv95JrsF
Now.. how to calculate the last vertice for getting a complete Quad? My Second Script isn´t really working. The LineRenderer stuggles with the positions, cause they seem to be wrong..
It´s not that i just need the coordinated of the Quad vertice. I need their ID on the triangle, too. So i can move them by click later.
need help :(
Comment