Class: GameMachine::Commands::NavigationCommands
- Inherits:
-
Object
- Object
- GameMachine::Commands::NavigationCommands
- Defined in:
- lib/game_machine/commands/navigation_commands.rb
Instance Method Summary collapse
Instance Method Details
#load_navmesh(id, path) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/game_machine/commands/navigation_commands.rb', line 5 def load_navmesh(id,path) if File.exists?(path) navmesh = GameMachine::Navigation::DetourNavmesh.create(id,path) navmesh.load_mesh! return navmesh else raise "Meshfile #{path} does not exist" end end |
#navmesh(id) ⇒ Object
15 16 17 |
# File 'lib/game_machine/commands/navigation_commands.rb', line 15 def navmesh(id) GameMachine::Navigation::DetourNavmesh.find(1) end |
#query_ref(navmesh_id) ⇒ Object
19 20 21 |
# File 'lib/game_machine/commands/navigation_commands.rb', line 19 def query_ref(navmesh_id) GameMachine::Navigation::DetourPath.query_ref(navmesh_id) end |