Hi All
I am trying to create a room floor using the procedural mesh component. I want this in an AR app, where the user touches the screen to lay down vertex co-ordinates and the presses a button to generate a mesh based on those vertices. I can get this working when the user places three vertices but after that I’m lost on how to script UE4 into using more than three vertices to create a square for instance, then up to a more complicated room surface.
In this first part I am getting the touch co-ordinates from the finger and using the Apple ARkit to get real world co-ordinates.
In the second image I am then storing those co-ordinates into an array that is then driving the triangle array and UV array, both of which do not work. I am also spawning an object at the locations to show a position has been stored.
Lastly I am calling a custom event that creates the mesh based on the vertices arrays I have stored, through a simple button on a widget.
I have looked at a few things that go through the proper indexes you should use when creating a square etc. but nothing that would allow me to scale this to a more complicated surface.
any help would be appreciated.