playMaker

Author Topic: Lead Target / Find Intercept Point  (Read 4040 times)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2494
  • Mender of the past
    • View Profile
    • Cleverous
Lead Target / Find Intercept Point
« on: March 16, 2014, 10:25:14 AM »
This action will take an Origin position and compute an intercept point for a moving target based on a speed variable. It's not perfect, but can be pretty powerful as is.

I'm working on AI and compiled this in an hour or so based on some reference code found on the unity forums (creds in code). Please feel free to test it and make suggestions or adjust it yourself.

// 21-Aug-14
// LeadTarget minor update to be in Physics category and check for Rigidbody on The Target.
// LeadTarget2d added
« Last Edit: August 21, 2014, 07:46:02 AM by Lane »

Marsh

  • Full Member
  • ***
  • Posts: 227
  • Comfort the disturbed, disturb the comfortable
    • View Profile
Re: Lead Target / Find Intercept Point
« Reply #1 on: March 16, 2014, 01:50:19 PM »
Looks great, If some of the basic game making functions can be implemented into PlayMaker instead of just the Unity Commands it would make it a truly powerful tool indeed!

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2494
  • Mender of the past
    • View Profile
    • Cleverous
Re: Lead Target / Find Intercept Point
« Reply #2 on: March 24, 2014, 01:17:34 PM »
Looks great, If some of the basic game making functions can be implemented into PlayMaker instead of just the Unity Commands it would make it a truly powerful tool indeed!

Yeah I wanna make some more of these sort of actions. I usually look at some code and find ways to translate that into actions but eventually I was just like "why don't I just use the code and expose the variables in a action?"... Makes way more sense and cleans up the states significantly.

escpodgames

  • Hero Member
  • *****
  • Posts: 686
    • View Profile
    • Assets
Re: Lead Target / Find Intercept Point
« Reply #3 on: March 24, 2014, 05:20:54 PM »
Super handy action, thx Lane!

Uttpd

  • Junior Playmaker
  • **
  • Posts: 68
    • View Profile
Re: Lead Target / Find Intercept Point
« Reply #4 on: March 26, 2014, 09:25:23 AM »
Thanks for the magic

FRickReich

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: Lead Target / Find Intercept Point
« Reply #5 on: July 16, 2014, 04:39:58 PM »
fantstic!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15396
  • Official Playmaker Support
    • View Profile
Re: Lead Target / Find Intercept Point
« Reply #6 on: July 18, 2014, 05:14:34 AM »
Hi,

 should go on the ecosystem :)

bye,

 Jean

jameskyle

  • Playmaker Newbie
  • *
  • Posts: 15
    • View Profile
Re: Lead Target / Find Intercept Point
« Reply #7 on: August 21, 2014, 05:48:07 AM »
Are there any plans for a version that supports rigidbody2D components? I'm having trouble getting it working in a 2D environment.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2494
  • Mender of the past
    • View Profile
    • Cleverous
Re: Lead Target / Find Intercept Point
« Reply #8 on: August 21, 2014, 07:16:07 AM »
Yup. I added it to the main post. =)

jameskyle

  • Playmaker Newbie
  • *
  • Posts: 15
    • View Profile
Re: Lead Target / Find Intercept Point
« Reply #9 on: August 21, 2014, 07:18:40 AM »
Wow, thanks for such a quick response! :D