playMaker

Author Topic: Shooting at direction  (Read 2703 times)

Lince

  • Playmaker Newbie
  • *
  • Posts: 1
Shooting at direction
« on: September 14, 2012, 01:27:45 PM »
I'm tying to make a sphere shot a capsule at the actual axis direction, but, it's not working.

Anyone can give a simple way to do it? what actions should i use?

thanks!

gregmax17

  • Playmaker Newbie
  • *
  • Posts: 11
Re: Shooting at direction
« Reply #1 on: September 14, 2012, 06:26:51 PM »
Hear hear! (kind of)

How do I do a simple translate "forward"? I am surprised that this isn't a option in the translate action itself :/

(the same goes for .right, .up, etc)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Shooting at direction
« Reply #2 on: September 15, 2012, 04:20:29 AM »
Hi,

 forward is the z axis, to use the translate action and put a value in the z axis, that will move forward.

http://docs.unity3d.com/Documentation/ScriptReference/Vector3.html

in the link above you get the relation between "forward" and a vector3 values.
https://hutonggames.fogbugz.com/default.asp?W201

bye,

Jean

DARK_ETERNAL

  • Full Member
  • ***
  • Posts: 110
Re: Shooting at direction
« Reply #3 on: October 22, 2012, 04:22:02 PM »
@Lince Store the shooter object rotation to a variable, and when instantiating whatever you are to shoot, set its rotation to the shooter's, which is the one you would store. And then, use the Set Velocity action, giving the value to the Z axis. Possitive. Negative would mean 'backward'

Although I agree with @gregmax17. There should be the option to reference to Unity basic vectors, and a multiplier to change that vector.
Check out our new game: Nitro Chimp. Now live in App Store!

Trailer:
Download: https://itunes.apple.com/app/nitro-chimp/id557150450?l=en&mt=8

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Shooting at direction
« Reply #4 on: October 23, 2012, 03:39:15 AM »
Hi,

 have you tried this shooting action I just did a while ago:
http://hutonggames.com/playmakerforum/index.php?topic=2373.0

bye,

 Jean