Pages

Advertisement

Saturday, June 22, 2013

AI vehicle movement in cryengine 3

                             
                                    Normally you can move your AI vehicle using AI follow path, but you can't control the speed of the vehicle. Using vehicle follow path you can control the speed and you can reverse the vehicle.
                                 To move your AI vehicle you need a AI driver. Add a AI(grunt) near the vehicle. Create a AI path. Go to flow graph and create the following four nodes.

  • Start
  • EntityID(Add node->Entity->EntityID)
  • Enter(Add node->Vehicle->Enter)
  • FollowPath(Add node->Vehicle->FollowPath)
                               Then connect those nodes.

                                Right click and assign EntityID and FollowPath nodes to the vehicle. Assign Enter node to the grunt.
                                Go to Enter Node. Set Fast value to true. Set vehicle seat to 'Driver'. 
                                Go to FollowPath Node. Set 'true' for PathFindToStart and StartNearest. Then give your AI path name.

                                 Set the speed of the AI vehicle(mine was too high) and play the game. Make sure to click on Generate All AI in the menu.

No comments:

Post a Comment