Skip to content

Seamless Path switch #141

@Redsam121

Description

@Redsam121

I'm working on a rail shooter game using the path creator and contains alternate paths that can be taken.

The problem is that the transition of paths is not smooth, the player immediately snaps to next point. I want the player to smoothly fly to the newly entered path. How do I do that?

private void OnTriggerEnter(Collider other) { if (other.GetComponent<PathCreator>()) { if (pathcreator.gameObject == other.gameObject) return; pathcreator = other.GetComponent<PathCreator>(); distanceTravelled = pathcreator.path.GetClosestDistanceAlongPath(transform.parent.position); Debug.Log(pathcreator.path.GetClosestDistanceAlongPath(transform.parent.position)); } }

Capture

Capture2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions