playMaker

Author Topic: Pathfinding Actions Beta  (Read 30364 times)

gamedivision

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Re: Pathfinding Actions Beta
« Reply #30 on: October 06, 2012, 03:03:29 PM »
so i worked it out using the
set agent destination as game object but auto repath doesn't seem to be that great soon as im out of view it cant reorganise a new path

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Pathfinding Actions Beta
« Reply #31 on: October 07, 2012, 10:44:23 PM »
Hi,

 have you tried "SetAgentDestinationAsGameObject" action?

bye,

 Jean

gamedivision

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Re: Pathfinding Actions Beta
« Reply #32 on: October 09, 2012, 11:44:40 AM »
Hi,

 have you tried "SetAgentDestinationAsGameObject" action?

bye,

 Jean
yeah i used that,i think im gona have to get real in depth with this,because what i want is a real advanced AI that can manoeuvre around abjects and track down the good guy or bad guy when in visual distance.i was also thinking when under fire the enemy could take cover,so maybe if i hit him that would instigate a set of rules for him to take cover,yeah i know big job but not impossible,i think ill have to spend a hole weekend using trial and error with every item to see what each does for the navmesh,what i did try was red's AI tutorials then instead of a move to command i put "SetAgentDestinationAsGameObject" action,but that didn't really work that well.
im trying to fake stuff with my lack of knowledge,but my laptops up and running in a couple of days so i can take unity and playmaker to work and learn while at work.
so no more excuses for being at work for 45hrs a week.that being said i really appreciate peoples tutorials and pointers in the right direction,and you never know i could help people in the future.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Pathfinding Actions Beta
« Reply #33 on: October 09, 2012, 10:29:17 PM »
Hi,

 SetAgentDestinationAsGameObject is definitly what you need if you want an agen to follow a moving target.

 I suggest reading over and over the unity documentation before doing trial and errors, as it is important to first grasp the general concepts, else it takes way more time to find things out :)

bye,

 Jean

gamedivision

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Re: Pathfinding Actions Beta
« Reply #34 on: October 18, 2012, 08:55:37 AM »
i just wanted to ask whats the best way to share a scene or project,ive incorporated reds Ai with navmesh and would like to share or if people could improve on what ive done on the scene file,or project whatever is best, if i go to the project and compress its too big.

thanks
« Last Edit: October 18, 2012, 09:36:52 AM by gamedivision »

gamedivision

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Re: Pathfinding Actions Beta
« Reply #35 on: October 18, 2012, 12:40:57 PM »
if i create a prefab then add it to the scene it doesn't keep the destination object on SetDestinationGameObject,so i have to manually re add the destination object,also on the get distance,it doesn't keep the target ,u have to manually add those.any ideas or am i in the wrong and it would never save those when creating prefabs.

thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Pathfinding Actions Beta
« Reply #36 on: October 18, 2012, 11:37:10 PM »
Hi,

 first, sharing playmaker content should be done by exporting your assets using the "Export package" option from the assets menu.

WARNING: Always remove the playmaker.dll file in the list of assets you are going to package ( Unity will give you that list before you save it). Playmaker.dll is not permitted for distribution.

Second, Unity Prefab system do not store reference to objects in your scene, only reference of gameObject parented to itself. You will have to manually set these scene gameObject references after the prefab is instantiated. USe of global variables is commong in this case, but you can also simply send an event to the newly instantitate prefab right after you created it and pass it a reference to the target you want it to follow, or have the prefav itself find out from your system what it needs to follow ( maybe find the player by tag, or something)

bye,

 Jean

gamedivision

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Re: Pathfinding Actions Beta
« Reply #37 on: October 19, 2012, 06:28:59 AM »
thank you jean

zoic

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Re: Pathfinding Actions Beta
« Reply #38 on: February 09, 2013, 11:19:06 AM »
Great actions...works great but..

Q.   Is it possible for navagent to avoid newly created objects ?

Example - I create a bulding and navagent see it like static object ... or i need any other method

or there are limitations  in Unity navmesh for this yet ?

 i saw somthing like navmesh obstcles? is it in unity 4  ?

http://docs.unity3d.com/Documentation/Components/class-NavMeshObstacle.html

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Pathfinding Actions Beta
« Reply #39 on: February 17, 2013, 10:55:03 PM »
Hi,

 cool, this is a new feature,it wasn't available at the time when I ported navmesh.
 
Let me finish mecanim support, then I have two three threads waiting ( poolManager for example) and I'll then tackle this. Could you bump this in 2 weeks of so? I would greatly appreciate!

bye

 Jean

kLy

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Re: Pathfinding Actions Beta
« Reply #40 on: March 11, 2013, 07:39:01 AM »
Let's see... more than 2 weeks now... BUMP! :D

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2484
  • Yup.
    • View Profile
    • Cleverous
Re: Pathfinding Actions Beta
« Reply #41 on: March 11, 2013, 11:07:18 AM »
Has anyone compared using these Actions versus using Sven's actions along with Aron's A* Kit?

zoic

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Re: Pathfinding Actions Beta
« Reply #42 on: March 15, 2013, 01:21:05 PM »
Let's see... more than 2 weeks now... BUMP! :D
i think it will not help much.. becouse of unity limitations yet..

obstacles have circle collaider zone, so its not usefull for buldings with corners...

and i think we can wait 2 weeks,2 month or 2 years if needed ))

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Pathfinding Actions Beta
« Reply #43 on: March 17, 2013, 11:59:40 PM »
Hi,

 in the process of finishing everything, I am left with mecanim, pool manager/targetpro, arraymaker and then I'll tackle this :)

bye,

 Jean

holyjewsus

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Re: Pathfinding Actions Beta
« Reply #44 on: March 19, 2013, 03:42:20 PM »
Hey Jean,

I've definitely run into some problems with these actions but it's tough to tell where the error is:

Using the agentSetDestinationGameobject action works fine twice, (the agent moves to one point, checks the distance, moves back to another point) but the third time I call set destination gameobject, the path never gets recalculated and the agent never moves, then the distance checks are all 0 and the path status complete events fire...

I've changed this FSM to use agentsetdestination and I use the position of the gameobjects instead and this works fine, my guess is this setDestinationGameojbect action may have a bug, I'll take a look at the code when I can.