I am a beginner with vertice and mesh.
I want to get a user drawing, it will be a line/spline in one surface (2D) (X,Z) . I think I could do this with a line renderer, maybe.
From this line, (i see with line render, i have an array with point) generate a mesh in one direction (for example 2 axis).
And then add a collider and texture to this mesh.
At the end it will be like a maze create by the user and then he could move in.
Have you some idea of the different step I have to do ?
heres one example using linerenderer and edgecollider,
but you could also manually generate mesh yourself too, and then add mesh collider to it,
even easier if you are only moving in straight lines (basically in grid)
Hi @mgear ,
I checkout this code, it’s a great example for how I have to do to add a collider.
What I want to do and don’t know how to do is :
draw a line with mouse : this is normally ok with line renderer
get all this point that represent the line : I saw the array in the inspector, if think it should be lineRenderer.GetPosition fonction
-create a mesh from these points in one direction ( if the lien was in (x,y) plane, i want to create an mesh along z axis) : don’t know how to do this
add a collider to this mesh : seems to be like the code you send to me .
Could you please not to make duplicates of your posts? If someone have ideas they will share with you in your original post.
Occasionally, and if you have any substantial things to add, you can comment on your original post and it will go back up in the list of posts. It’s against the forum rules to open more than one thread on one subject.