- Home /
[C#] Itween rotation/orienttopath messed up when building the project
I started using iTween in my project a while back to simplify the movement process and it is working perfect in the unity editor, at runtime or otherwise. Unfortunately i just tried building the project (Windows Mac Linux, but im running on windows) and everything seems to be working apart from the "orienttopath" function
The rotation (alignment) is there but its "lazy" and it never reaches the point where the ship is correctly aligned to the path
Simple iTween that im using:
private void MoveAlongCurve() {
iTween.MoveTo (gameObject, iTween.Hash ("path", positions, "orienttopath", true, "speed", shipStats.speed, "easetype", iTween.EaseType.easeInOutSine, "oncomplete", "MoveComplete"));
}
positions is an array of vector3 coords calculated between the player and the mouse position (working correctly even in the build) MoveComplete just lets the game know that it can take another input from the user
Not too sure why this is happening as the ship is still travelling along the reference line, just won't orient correctly, unlike in the editor, where it is still working perfectly if i dont build the project.
UPDATE: I realized that the orientation in the build is always off by 90 degrees, the ship would orient itself based on its right side rather than the front. Everything still working perfectly in the editor though.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Why does my mouselook sensitivity change depending on resolution? (C#) 1 Answer
Switching Paths with iTween 0 Answers
iTween Path changing 0 Answers