Download

Wrong rotation Procedural Content with Blueprints

https://forums.unrealengine.com/core/image/gif;base64
​​Hi,

I’m following the official unreal course (Procedural Content with Blueprints) but the mesh created does not follow the spline, the rotation is wrong.

This is my construction script :

I’m calculating the distance between two points in the spline

2d457a3d37a0f3b173f5c7ae8f02de812d314868.png
https://forums.unrealengine.com/core/image/gif;base64
​​

then I divide the vector length of these 2 points by the size of my mesh (Wall_400x400), floor function, and another loop

fa0aed832238b5f899e58a6e287de0af63059b07.png
https://forums.unrealengine.com/core/image/gif;base64

Finally I get the Location and the Tangent along the spline and add an instance of a static mesh.

The location gives me the vector and I get the rotation from the Tangent vector (RotationFromXVector)

7926d95cedf52058d6d9e4544965e0d4f7077105.png

My problem is that the static mesh is not correctly following the Spline, it has like a 90 degrees rotations which I don’t know why.

6737a4de42dfcdf177f5a18d97a67a435a69f79b.jpeg

Thank you