For a patrolling character, go to to the Tech demos folder
"Asset Library\Scenes\Tech Demos\Lua\SCC - Follow Path.xSkyScene"
this demo has a spline path created using the path editor( next version has an upgraded editor ).
The character in the scene has a basic script to move the character around the path.
Essentially a single line can make a character follow a path:
This is for a character using a "Simple Character Controller" action.
- Code: Select all
function onUpdate( td )
character.followPath(obj, pathName, walkSpeed);
end
For a dynamically spawned character, use:
- Code: Select all
function onUpdate( td )
controller.followPath(dccID, pathName, walkSpeed);
end
lol, just as simple
