playMaker

Author Topic: Pathfinding - Get position on path  (Read 2026 times)

SeanC

  • Junior Playmaker
  • **
  • Posts: 61
Pathfinding - Get position on path
« on: January 31, 2014, 12:31:08 AM »
Is it possible, using Unity's navmesh system, to create a path between the agent and a destination, and sample points along that path at set increments, ie. Get a vector that is 1 unit into a path?




jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Pathfinding - Get position on path
« Reply #1 on: January 31, 2014, 07:28:41 AM »
Hi,

 yes, the action is called "AgentSamplePathPosition"

I think it will do what you want.

bye,

 Jean

SeanC

  • Junior Playmaker
  • **
  • Posts: 61
Re: Pathfinding - Get position on path
« Reply #2 on: February 01, 2014, 02:07:22 PM »
It seems like this samples the current position of the agent as it travels along that path. Is there a way to create a path, and then simply say, sample a position on that path at 1 unit....now at 2 units along the path...now 3. Without the agent wever having to travel the path?

My goal is to use unity's navmesh system to build an appropriate path, but then sample points at known distances along the path and find the closest waypoint nodes. Then I can just have my character move to those in order.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Pathfinding - Get position on path
« Reply #3 on: February 03, 2014, 04:56:18 AM »
Hi,

 uhm... that is in essence what the system does isn't it? why would want to use Pathfinding to finally define your path yourself?

For this I would a regular spline sdk available on the asset store, they will allow you to sample points within them splines/pathes.


bye,

 Jean