Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: tcmeric on June 18, 2017, 02:19:24 AM

Title: Launch a Grenade, Projectile or Cannon Ball with Path Prediction
Post by: tcmeric on June 18, 2017, 02:19:24 AM
Tutorial and custom action.

1. Imagine you want to throw your grenade (or missile or whatever) to a specific location, from a specific location. Ie, from your hand to the bad guys face. But how do you know exactly how much force to apply to get that rigidbody grenade to land at the exact spot? Watch the tutorial and download the custom actions from my github account!

It only takes 1 action to calculate and 1 action to launch. Easy.

2. Imagine you want to predict the path of that grenade BEFORE you throw it. And render the line on screen to show your players. That way they can decide if they want to throw it. I have a custom action for that too! (Please note, this second custom action set requires a paid asset called "Trajectory Predictor". https://www.assetstore.unity3d.com/en/#!/content/55752

I wrote a custom playmaker action to predict the path from playmaker (to use with this asset). The action is free, the asset is not.

All of this is covered in my tutorial here on youtube:
This is all rigidbody based (no animations), so that your grenade can hit a wall or bounce off the floor naturally. These calculations work with any height! No need for a flat ground.

Actions can be found here (although I strongly suggest you watch the tutorial first: https://github.com/dumbgamedev/general-playmaker/tree/master/projectiles

If you like these custom actions and tutorials, feel pledge a few $ into my patreon account. https://www.patreon.com/playmaker
Title: Re: Launch a Grenade, Projectile or Cannon Ball with Path Prediction
Post by: Pandur on July 01, 2017, 10:03:14 PM
thx for that tutorial,i have looking for a long time for it.

by the way can you make a playmaker action for that damage system of this asset?
https://www.assetstore.unity3d.com/en/#!/content/78899

I have look yesterday how i can use it with set property but the shootingHandler in that asset can not be use with playmaker,but this damage system is very nice and usefull for other npc´s (ragdolls with BodyParts)and works a lot better as the Dismembering Asset (https://www.assetstore.unity3d.com/en/#!/content/90674)

Thx :D
Title: Re: Launch a Grenade, Projectile or Cannon Ball with Path Prediction
Post by: Prestonh on November 07, 2018, 11:34:31 AM
Anyone anle to update the action?  It just gives me errors.  But its such a beautiful action (that i want)
Title: Re: Launch a Grenade, Projectile or Cannon Ball with Path Prediction
Post by: djaydino on November 07, 2018, 11:44:37 AM
Hi.
You might want to pm to tcmeric (http://hutonggames.com/playmakerforum/index.php?action=profile;u=15738)
and when you ask, add the link to this post :)
Title: Re: Launch a Grenade, Projectile or Cannon Ball with Path Prediction
Post by: tcmeric on November 07, 2018, 06:27:50 PM
What is the error? Do you have Trajectory Predictor Asset in your project?
Title: Re: Launch a Grenade, Projectile or Cannon Ball with Path Prediction
Post by: jermerqua on March 29, 2020, 11:44:14 AM
I got excited there for a second because I did not have trajectory predictor installed but I did just now go ahead and install it and it's still throwing up a bunch of errors.

I've attached the errors here. Scratching my head when I look at them all :-)


Could it be the version of the Unity file when I star new (.3.7 vs .2.9 vs 1.14)

Title: Re: Launch a Grenade, Projectile or Cannon Ball with Path Prediction
Post by: daniellogin on March 30, 2020, 12:17:24 AM
Sounds good. I've wondered at times how it would work but never needed to do it. Bookmarked now for future reference. Thanks.
Title: Re: Launch a Grenade, Projectile or Cannon Ball with Path Prediction
Post by: tcmeric on March 30, 2020, 03:21:41 AM
Hi, try deleting any of the actions that are giving you errors. Then see if unity will compile properly. Start from the top of the debug list (red errors) and work your way down.
Title: Re: Launch a Grenade, Projectile or Cannon Ball with Path Prediction
Post by: jermerqua on March 30, 2020, 08:36:08 PM
Ok, so i think I'm getting somewhere on this. Thanks for support.

So I took your advice and kept deleting the .cs files that were associated with the many errors. I deleted a couple then a couple new ones would appear. I deleted those and now I finally got it down to these few errors which I don't understand. With that said the custom panel in actions is at least now showing up. See screenshot...

UPDATE: I JUST CLOSED UNITY AND REOPENED AND IT SEEMS TO BE WORKING. GOING TO WALK THROUGH TUTORIAL TOMORROW.