Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: jeanfabre on October 02, 2012, 06:45:15 AM

Title: Canon ball shooting
Post by: jeanfabre on October 02, 2012, 06:45:15 AM
Hi,

 After some work done with Red, please find an action that will shoot a rigid body object based on an angle and distance. It uses the z axis ( forward) of the object you are shooting. Keep the y axis up like the world for predictable results.

 I have also made a sample to see how it's set up.

This sample is now available on the Ecosystem, look for ShootMissile

bye,

 Jean
Title: Re: Canon ball shooting
Post by: sefou on October 03, 2012, 01:59:27 AM

 :)

Thanks Jean.
Title: Re: Canon ball shooting
Post by: Red on October 03, 2012, 07:06:06 AM
This is a fantastic action! it may seem limited on the surface as to when you'd use it but you'll be surprised!

before it was almost nightmarish to get the proper forces set up to have a rigidbody affected by gravity to go in the arc you wanted it to, now it's simple to do!

Thank you Jean! i don't think i can say this enough! (as my game has about 7 "thrown" weapons.)
Title: Re: Canon ball shooting
Post by: MrMitch on October 17, 2012, 03:53:31 PM
Thanks Jean and Red

I had an idea a while back that will involve this action a lot, now i can get to the testing :)
Title: Re: Canon ball shooting
Post by: rojosedano on October 25, 2012, 08:45:56 PM
thanks for this excellent action, but I have a question.

I can not shoot another object other than the own action.
Not if I do something wrong.

thanks
Title: Re: Canon ball shooting
Post by: jeanfabre on October 26, 2012, 01:15:22 AM
Hi,

 yes you can actually. Simply select "Specify Game Object" in the action "game Object" property, and it will fire that instead of itself.

bye,

 Jean
Title: Re: Canon ball shooting
Post by: flora on July 21, 2015, 01:00:17 PM

encore une fois .. merci jean  :)
i always have trouble shooting a rigid body object based on an angle and distance .. so this is gonna be very handy!
Title: Re: Canon ball shooting
Post by: dudebxl on July 21, 2015, 05:44:31 PM
Cool.. Is this in the ecosystem?
Title: Re: Canon ball shooting
Post by: jeanfabre on July 23, 2015, 08:56:46 AM
Hi,

 No, it's not on the Ecosystem yet. But that would be a good samples to move there for sure.


Bye,

 Jean
Title: Re: Canon ball shooting
Post by: Chris Vitorino on August 11, 2015, 06:11:49 PM
Thank you very much for this! Solved my arrow/projectile problem.

+1 for going Ecosystem ; )
Title: Re: Canon ball shooting
Post by: Bryanogden on March 09, 2016, 11:36:55 AM
This action works exceptionally well for arrow projectiles and cannonballs ect... However is somewhat inaccurate when the target location includes a variation in Y axis. Its easy to launch an object on a plane in 3d by doing a get distance and lookat target prior - However what is the method to determine and calculate variations in Y which when greater than say 5 cause range issues. Also moving targets hop around if you use them in the target slot in the action  - as the target slot illustrates where the projectile will hit and is not useful for moving enemies.

Please respond...though this thread is a bit old
Title: Re: Canon ball shooting
Post by: jeanfabre on March 10, 2016, 05:49:57 AM
Hi,

 Yep, indeed the equation is meant to solve a projectile trajectory when the source and target is on the same plane.

http://answers.unity3d.com/questions/407480/rocketscience-how-to-find-out-what-force-is-needed.html

Try the link above to see if it could solve your height issue.

 if you don't know how to code, simply take apart the equation and make with the simple actions, you should have all the actions you need for this ( use the Ecosystem to find the ones missing)

Bye,

 Jean
Title: Re: Canon ball shooting
Post by: jeanfabre on March 14, 2016, 09:30:16 AM
Hi,

 Just bumped into this asset that seems to have potential for solving your issue. I would contact the author, he will have the necessary skills to provide a solution, I am pretty sure.

Bye,

 Jean
Title: Re: Canon ball shooting
Post by: tcmeric on May 21, 2017, 01:44:50 PM
Old thread, but I thinking of creating playmaker actions for one of the trajectory assets.

Looking at these two as possibilites

1. https://www.assetstore.unity3d.com/en/#!/content/42720
2. https://www.assetstore.unity3d.com/en/#!/content/55752
Title: Re: Canon ball shooting
Post by: jeanfabre on May 23, 2017, 02:32:47 AM
Hi,

 Cool initiative, I guess either is good.

 Bye,

 Jean
Title: Re: Canon ball shooting
Post by: tcmeric on June 17, 2017, 02:37:14 PM
Pew pew pew. It has been done. I wrote actions for this asset: https://www.assetstore.unity3d.com/en/#!/content/47750

Ballistic Projectile Helper, 5$.
Helpful C# library to deal with 3D ballistic math calculations. Great for any project involving ballistic projectiles and trajectories.

My actions as always are free. You can download them from my github. There is 1 action for each of the functions (methods) in this package. Ie, it covers it all.

https://github.com/dumbgamedev/projectileHelper-playmaker

I also write a few stand alone actions that can help to calculate position to position projectiles and then shoot them (on any axis or height). I will make a tutorial on that and post it soon as well.
Title: Re: Canon ball shooting
Post by: tcmeric on June 18, 2017, 05:25:58 AM
If you land on this post and you are looking some simple rigidbody actions for grenade/cannon ball launching, see my post here: http://hutonggames.com/playmakerforum/index.php?topic=15323.msg70845;topicseen#msg70845 (also for path prediction on screen).

While the above asset I posted in this thread is indeed great (and my actions are working!), they can be a bit complicated if you just need 1 simple thing. Of course, if you are looking to make various ballistic calculations for projectiles, then the package in this thread is top notch.