Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Nekoyoubi on April 19, 2011, 05:53:36 PM
-
What is the best way to test a Vector3 against zero?
I'm wondering because I would assume the best way to break out my Moving action from my Idle on my player object would be to set the Vector3 with Get Axis Vector, store it in an FSM variable, and then test that variable to see if it should move state.
Is this correct?
-
I'm thinking there should be Math and Logic actions for vectors just like there are for floats. Vector Add, Multiply, Vector Compare etc.
-
There are actions for Vector3 Add and Vector3 Multiply, but not a Vector3 Compare that I could find anywhere.
-
You can Store Magnitude in Get Axis Vector and use Float Compare on that...
-
You can Store Magnitude in Get Axis Vector and use Float Compare on that...
Have I ever told you you're my hero?
Actually, that should clean up the issue at hand, but now I'm curious, am I just missing a Vector3 Compare somewhere?
-
uhh.. apparently I need glasses because I totally missed the whole Vector3 category, thinking they would be in the Math category. Still a vector3 compare would indeed be handy :)
-
I guess you probably wouldn't want to try to figure out a Greater Than or Less Than, but I would think a result of Equal or Not Equal and a flexible Tolerance would make for a powerful Vector3 Compare. Really, this seems like it would just be a Get Distance, but comparing the distance of Vector3's; not Game Objects.
Alex, should I get to it you think, or do you already have something like this?
-
Sounds great!
-
Hey don't know if its still relevant or if you got around to making it, but I made a vector3 Compare action.
http://hutonggames.com/playmakerforum/index.php?topic=3058.0 (http://hutonggames.com/playmakerforum/index.php?topic=3058.0)