- Home /
Question by
GamezAtWork · Nov 11, 2010 at 02:35 AM ·
pathcurvewaypoints
Modifying regular waypoint moving code to curved path
In my game, you move between waypoints, where sometimes things might happen on those waypoints, events triggering and all.
Currently, my code makes the player turn towards the next waypoint, and move straight towards it. However, I want to make it such that his entire movement is smooth, like a bezier curve or something.
So how can I modify this:
this.transform.GetComponent(CharacterController).SimpleMove(this.transform.forward* speedToLocation *ownSpeed);
To moving in a complete curved path?
The examples that I have found so far are quite hard to modify as well, because for each waypoint, there might be an event to trigger, and I need to have detection whether they hit that waypoint or not.
Please help, thanks.
Comment