-
Notifications
You must be signed in to change notification settings - Fork 52
Navigationmanager
MMOMinion edited this page Mar 22, 2014
·
3 revisions
- The Navigationmanager holds all functions and information for navigation.
- this is a work in progress..
- Example:
local pos = Player.pos
d("Our Player is standing on the Navmesh: ".. tostring(Navigationmanager:IsOnMesh(pos.x,pos.y,pos.z)))
- :GetPath(x1,y1,z1,x2,y2,z2)
- Takes in 6 numbers and tries to calculate a navigationpath from position x1,y1,z1 to position x2,y2,z2. Returns a lua table with multiple positions if a path was successfully found. (lua table)
- :IsOnMesh(x,y,z)
- Returns if the position x,y,z is on the navmesh (up to 3 ingame units away from the navmesh is still considered to be on the navmesh) (boolean).
- :IsOnMeshExact()
- Returns if the position x,y,z is on the navmesh (boolean).
- :GetNavMeshName()
- Returns the currently loaded navmesh name (string).
- :UnloadNavMesh()
- Unloads the currently loaded navmesh (boolean).
- :LoadNavmesh(string)
- Loads the navmesh (.obj) at the location passed as string. HINT: Use GetStartupPath() to get the directory path to where ffxivminion was launched. (boolean).
- :SaveNavmesh(string)
- Saves the navmesh (.obj) at the location passed as string. HINT: Use GetStartupPath() to get the directory path to where ffxivminion was launched. (boolean).
- :ShowNavMesh(boolean)
- Toggles the visibility of the Navmesh (boolean).
- :ShowNavPath(boolean)
- Toggles the visibility of the Navpath (boolean).
- :GetRandomPointOnCircle(x,y,z,minradius,maxradius)
- Tries to find a random point at position x,y,z inbetween the min- and maxradius. Returns a lua table which holds the random point or nil if none was found (lua table).
- :GetPointToMeshDistance({x=??,y=??,z=??} , ignoreUpvector )
- Pass a position table containing values for x,y and z. The ignoreUpvector is a bool that tells the function to calculate distance without the y axis (2d).Returns how far the passed position x,y,z is away from the nearest navmesh-point (number).
- :GetClosestPointOnMesh( {x=??,y=??,z=??} , ignoreUpvector )
- Pass a position table containing values for x,y and z. The ignoreUpvector is a bool that tells the function to calculate distance without the y axis (2d). Returns the nearest position on the navmesh from this point x,y,z. (lua table).
- :AddNavObstacles(args)
- Adds one or more obstacles that the navigationsystem will not pass trough. "args" is a lua table where each entry has coordinates x,y,z and radius r. Example: [1] = { x=321,y=1234,z=444,r=12 }. (lua table).
- :ClearNavObstacles()
- Deletes all obstacles.
- :SetAvoidanceAreas(args)
- Adds one or more avoidance areas that the navigationsystem will treat as "very high costs to walk through them" and therefore most likely find another way around."args" is a lua table where each entry has coordinates x,y,z and radius r. Example: [1] = { x=321,y=1234,z=444,r=12 }. (lua table).
- :ClearAvoidanceAreas()
- Clears all avoidance areas.