Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: adrian on February 26, 2015, 04:41:17 PM

Title: Simple 3d mecanim aiming
Post by: adrian on February 26, 2015, 04:41:17 PM
Hello!

First post so sorry but how do I make a simple up down signed angle. Ie my soldier can turn left right no problem with get signed angle on the Y pointing at the mouse but up down using get signed angle X just will not output up down angle?

This feeds into a simple mecanim rig with 180 to -180 values. I have my get angle set to the mouse point vector3 versus the soldier.

Any help would be amazing? I've searched loads and can't find a solution. It's top down perspective if that helps.
Title: Re: Simple 3d mecanim aiming
Post by: invayne on February 27, 2015, 07:18:45 AM
first youll need animations for the up and down angles and just get your  y axis and set the animations to play on positive 1 or -1 or you can make a blend tree with all your aiming animations and just call parameters  in your fsm and just call those in your fsm's
Title: Re: Simple 3d mecanim aiming
Post by: adrian on February 27, 2015, 08:09:22 AM
The get axis is the bit I am struggling with, I have read guides talking about using an object locked to mouse pick then calculating it from there to the player to get the 180 to -180 accuracy I'm after. All I really want to do is have a players aim always angled to the mouse cursor from an isometric view, is Angle Y all I really need? just pointed at the mouse pick?
Title: Re: Simple 3d mecanim aiming
Post by: adrian on February 27, 2015, 09:31:03 AM
Tried so many things and nothing works, even payed for a kit to try and pick it apart and still nothing, just want a simple vertical angle from player to target :(