I’m attempting to create a script that takes two positions from the player, and creates a cube between those two points with a given height and depth. I can manage to generate a single face (Unity’s Mesh library makes it easy to do), but I run into trouble when I try to create the other faces. Since the mesh is generated between two points, it has the appearance of being “rotated,” but its forward vector remains relative to the world since the transform is never actually rotated. You can see an example of what I mean here:
This makes generating the other faces less than trivial (as far as I can tell) since I can’t just use the first face’s transform.forward to place the remaining vertices. If anyone has any experience with this let me know, and if you need any elaboration/code feel free to ask. Thanks!