playMaker

Author Topic: Canon ball shooting  (Read 14096 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Canon ball shooting
« 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
« Last Edit: November 12, 2018, 03:16:21 AM by jeanfabre »

sefou

  • Playmaker Newbie
  • *
  • Posts: 11
Re: Canon ball shooting
« Reply #1 on: October 03, 2012, 01:59:27 AM »

 :)

Thanks Jean.

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Canon ball shooting
« Reply #2 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.)

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • Rage Quit Games - Coming Soon
Re: Canon ball shooting
« Reply #3 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 :)

rojosedano

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Canon ball shooting
« Reply #4 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Canon ball shooting
« Reply #5 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

flora

  • Playmaker Newbie
  • *
  • Posts: 47
Re: Canon ball shooting
« Reply #6 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!

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Canon ball shooting
« Reply #7 on: July 21, 2015, 05:44:31 PM »
Cool.. Is this in the ecosystem?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Canon ball shooting
« Reply #8 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

Chris Vitorino

  • Playmaker Newbie
  • *
  • Posts: 14
Re: Canon ball shooting
« Reply #9 on: August 11, 2015, 06:11:49 PM »
Thank you very much for this! Solved my arrow/projectile problem.

+1 for going Ecosystem ; )

Bryanogden

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Canon ball shooting
« Reply #10 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Canon ball shooting
« Reply #11 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Canon ball shooting
« Reply #12 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

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Canon ball shooting
« Reply #13 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Canon ball shooting
« Reply #14 on: May 23, 2017, 02:32:47 AM »
Hi,

 Cool initiative, I guess either is good.

 Bye,

 Jean