10-21-2021, 07:15 PM
Hi,
I have a question.
I want to move GameObjects along the path of Curvy Splines, but when I bend the path by changing the position of the CP of the path, the objects will be displaced from the generated mesh.
Please see the videos to see how this happens.
(Please view with Google Chrome)
https://dotup.org/uploda/dotup.org2625121.webp
https://dotup.org/uploda/dotup.org2625123.webp
The first image shows the case where the CP position of the path is changed, and the second image shows the case where the CP position of the path is all set to 0.
In the first case, we want to move the object without it protruding from the mesh as in the second case.
The object is programmed to move on the path as time passes.
Every frame calls curvyPath.Interpolate(TF);, and TF increases over time.
In our current implementation, we use the position of each CP in the Input Splines Shape to prevent objects from protruding from the mesh (although they do as a result).
I think I probably need to do some kind of correction for the position obtained by curvyPath.Interpolate(TF);, but I don't know how to do it.
Could you let me know.
I have a question.
I want to move GameObjects along the path of Curvy Splines, but when I bend the path by changing the position of the CP of the path, the objects will be displaced from the generated mesh.
Please see the videos to see how this happens.
(Please view with Google Chrome)
https://dotup.org/uploda/dotup.org2625121.webp
https://dotup.org/uploda/dotup.org2625123.webp
The first image shows the case where the CP position of the path is changed, and the second image shows the case where the CP position of the path is all set to 0.
In the first case, we want to move the object without it protruding from the mesh as in the second case.
The object is programmed to move on the path as time passes.
Every frame calls curvyPath.Interpolate(TF);, and TF increases over time.
In our current implementation, we use the position of each CP in the Input Splines Shape to prevent objects from protruding from the mesh (although they do as a result).
I think I probably need to do some kind of correction for the position obtained by curvyPath.Interpolate(TF);, but I don't know how to do it.
Could you let me know.