Hello, I’d like to make sure that every time I click the mouse, it sets a cylinder. So far, everything is working the way I want. But I would also like the cylinder when I place it to be in the same orientation as the ground where it is. So I get the normals to be able to rotate, the cylinder is oriented but not at all as I want…
I also have a second problem: if you try the playground, you’ll see that each mesh placed is in y = 1. this is normal because on line 200, I have the getHeightAtCoordinates which returns an error in the console …
I must be using it wrong ?
thank you in advance for your answers and your help, which will be much appreciated!
getHeightAtCoordinates is a function tat exists only on a GroundMesh. The mesh you are using there is a Mesh object, so the function is not available for it.
About the first question - would you be able to elaborate a bit more about the issue? can you show a (simplified) playground that shows the incorrect behavior?
Hello, I’ve tried to condense a bit, but it’s complicated because the functions are ‘all’ linked to each other… but if I’m not saying anything stupid, it can only come from normals… or at least my way of doing things, which seems correct to me. The lines where I use normals are framed with ‘#########’ or from line 165-197.