playMaker

Author Topic: Launch a Grenade, Projectile or Cannon Ball with Path Prediction  (Read 379 times)

tcmeric

  • Sr. Member
  • ****
  • Posts: 480
    • View Profile
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: https://www.youtube.com/watch?v=SH-c1hqdELU&t=248s

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
« Last Edit: June 18, 2017, 02:22:38 AM by tcmeric »

Pandur

  • Junior Playmaker
  • **
  • Posts: 82
    • View Profile
Re: Launch a Grenade, Projectile or Cannon Ball with Path Prediction
« Reply #1 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