Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Lince on September 14, 2012, 01:27:45 PM

Title: Shooting at direction
Post by: Lince 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!
Title: Re: Shooting at direction
Post by: gregmax17 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)
Title: Re: Shooting at direction
Post by: jeanfabre 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 (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 (https://hutonggames.fogbugz.com/default.asp?W201)

bye,

Jean
Title: Re: Shooting at direction
Post by: DARK_ETERNAL 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.
Title: Re: Shooting at direction
Post by: jeanfabre 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 (http://hutonggames.com/playmakerforum/index.php?topic=2373.0)

bye,

 Jean