Path-Creator icon indicating copy to clipboard operation
Path-Creator copied to clipboard

Missing fragments of road with strange GetRotation values when using RoadPathCreator

Open infoexpertgames opened this issue 5 years ago • 0 comments

Hi Sebastian. Missing fragments of road when using RoadPathCreator. I have no idea why this happens. Normals hasn't been changed from code.

My player GameObject gets rotation (-1.06, 29.632, 4.346) at point (384.7814, 20.70795, 1509.418) and than sudden the player object rotations changes to (-1.057, 29.495, 89.72201) at point (386.1715, 20.76006, 1511.858).

Im using this code to position player:

player.transform.position = roadPath.GetPointAtTime(delta, EndOfPathInstruction.Stop);
player.transform.rotation =  roadPath.GetRotation(delta, EndOfPathInstruction.Stop) * Quaternion.Euler(0, 0, 90);

Can you check what is wrong with path creator? I can send you my unity project if you like.

My points are:

public Vector3[] pathPoints = new Vector3[] {
        new Vector3(0.0f, 0.0f, 0.0f),
        new Vector3(0.0f, 0.0f, 41.7f),
        new Vector3(0.0f, 0.0f, 83.3f),
        new Vector3(3.6f, 0.0f, 124.8f),
        new Vector3(3.6f, 0.0f, 166.5f),
        new Vector3(3.6f, 0.0f, 208.2f),
        new Vector3(3.6f, 0.0f, 249.8f),
        new Vector3(7.2f, -3.6f, 291.2f),
        new Vector3(14.4f, -10.9f, 331.6f),
        new Vector3(25.0f, -21.6f, 370.4f),
        new Vector3(35.7f, -28.7f, 410.1f),
        new Vector3(46.5f, -32.3f, 450.2f),
        new Vector3(57.2f, -32.2f, 490.4f),
        new Vector3(64.3f, -28.6f, 531.3f),
        new Vector3(71.2f, -21.4f, 571.8f),
        new Vector3(74.2f, -10.7f, 611.9f),
        new Vector3(77.1f, 3.4f, 651.0f),
        new Vector3(76.8f, 10.3f, 692.1f),
        new Vector3(80.6f, 10.2f, 733.6f),
        new Vector3(91.5f, 10.5f, 773.8f),
        new Vector3(109.3f, 11.2f, 811.5f),
        new Vector3(130.2f, 12.0f, 847.5f),
        new Vector3(147.9f, 12.7f, 885.2f),
        new Vector3(162.3f, 13.2f, 924.4f),
        new Vector3(176.7f, 13.6f, 963.5f),
        new Vector3(187.6f, 13.9f, 1003.7f),
        new Vector3(195.0f, 14.0f, 1044.7f),
        new Vector3(202.4f, 14.1f, 1085.7f),
        new Vector3(206.1f, 14.1f, 1127.2f),
        new Vector3(209.9f, 14.0f, 1168.7f),
        new Vector3(210.1f, 13.7f, 1210.3f),
        new Vector3(213.9f, 13.6f, 1251.8f),
        new Vector3(224.8f, 13.9f, 1292.0f),
        new Vector3(245.7f, 14.7f, 1328.1f),
        new Vector3(275.3f, 16.1f, 1357.4f),
        new Vector3(302.1f, 17.3f, 1389.2f),
        new Vector3(326.1f, 18.3f, 1423.3f),
        new Vector3(350.1f, 19.3f, 1457.3f),
        new Vector3(374.1f, 20.3f, 1491.4f),
        new Vector3(395.0f, 21.1f, 1527.4f),
        new Vector3(416.0f, 22.0f, 1563.4f),
        new Vector3(436.9f, 22.8f, 1599.4f),
        new Vector3(457.9f, 23.7f, 1635.4f),
        new Vector3(472.2f, 24.2f, 1674.5f),
        new Vector3(479.6f, 24.3f, 1715.6f),
        new Vector3(479.8f, 24.0f, 1757.2f),
        new Vector3(479.9f, 23.7f, 1798.9f),
        new Vector3(480.1f, 23.4f, 1840.6f),
        new Vector3(482.5f, 19.1f, 2482.2f),
        new Vector3(482.6f, 18.9f, 2523.9f),
        new Vector3(482.8f, 18.6f, 2565.5f),
        new Vector3(483.0f, 18.3f, 2607.2f),
        new Vector3(483.1f, 18.0f, 2648.9f),
        new Vector3(483.3f, 17.7f, 2690.5f)
    };

path_creator_issue_1

Best regards Peter

infoexpertgames avatar Aug 29 '19 13:08 infoexpertgames