Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: vonpopov on February 01, 2014, 11:33:28 AM

Title: [SOLVED] Get Axis Vector / positive vs negative value
Post by: vonpopov on February 01, 2014, 11:33:28 AM
Hi,

I am using Get Axis Vector. I would like the value get on Horizontal axis, to be stored with a different Multiplier depending on : NEGATIVE Horizontal, or POSITIVE Horizontal ?

how make it possible ?
Title: Re: Get Axis Vector / positive vs negative value
Post by: Lane on February 01, 2014, 11:47:10 AM
You would use 2 states and a float compare to send it to the Negative state where it stores the axis in a different float.

Or, modify the action to do a compare internally and store the float in different variables depending on its value. This is better.
Title: Re: Get Axis Vector / positive vs negative value
Post by: vonpopov on February 01, 2014, 11:58:40 AM
You would use 2 states and a float compare to send it to the Negative state where it stores the axis in a different float.

Or, modify the action to do a compare internally and store the float in different variables depending on its value. This is better.


i did like this, and it works.

Get axis vector3 > Get Vector XYZ (split into 2 float) > compare X to 0 , if less = do nothing, if greater then go another state and do = float muliplier 0.5 > Compare X to 0, if less return previous state, otherwhy continue.

What do you think ?


Thanks for your help :)



Title: Re: Get Axis Vector / positive vs negative value
Post by: parallel on February 01, 2014, 01:38:13 PM
There's also the 'Float Sign Test' action, sending events based on a floats sign +/-
Title: Re: Get Axis Vector / positive vs negative value
Post by: vonpopov on February 01, 2014, 05:35:54 PM
There's also the 'Float Sign Test' action, sending events based on a floats sign +/-

Wow i didn't know.
I am gonna optimize my work with that action !

Thanks you


Nb : tested, it works with a cleaner code !!!! wow thanks you !