playMaker

Author Topic: Vector3 test?  (Read 7885 times)

Nekoyoubi

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 35
  • I scribble syntax, paint pixels, carve faces, and
    • Nekoyoubi Games
Vector3 test?
« 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?
- Lance @ Nekoyoubi Games (nekoyoubi.com)

marvmiller

  • Playmaker Newbie
  • *
  • Posts: 14
Re: Vector3 test?
« Reply #1 on: April 19, 2011, 06:17:19 PM »
I'm thinking there should be Math and Logic actions for vectors just like there are for floats.  Vector Add, Multiply, Vector Compare etc.

Nekoyoubi

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 35
  • I scribble syntax, paint pixels, carve faces, and
    • Nekoyoubi Games
Re: Vector3 test?
« Reply #2 on: April 19, 2011, 07:14:28 PM »
There are actions for Vector3 Add and Vector3 Multiply, but not a Vector3 Compare that I could find anywhere.
- Lance @ Nekoyoubi Games (nekoyoubi.com)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Vector3 test?
« Reply #3 on: April 19, 2011, 07:19:37 PM »
You can Store Magnitude in Get Axis Vector and use Float Compare on that...

Nekoyoubi

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 35
  • I scribble syntax, paint pixels, carve faces, and
    • Nekoyoubi Games
Re: Vector3 test?
« Reply #4 on: April 19, 2011, 07:24:41 PM »
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?
« Last Edit: April 19, 2011, 07:26:27 PM by Nekoyoubi »
- Lance @ Nekoyoubi Games (nekoyoubi.com)

marvmiller

  • Playmaker Newbie
  • *
  • Posts: 14
Re: Vector3 test?
« Reply #5 on: April 20, 2011, 01:57:13 PM »
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  :)

Nekoyoubi

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 35
  • I scribble syntax, paint pixels, carve faces, and
    • Nekoyoubi Games
Re: Vector3 test?
« Reply #6 on: April 20, 2011, 02:37:09 PM »
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?
- Lance @ Nekoyoubi Games (nekoyoubi.com)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Vector3 test?
« Reply #7 on: April 21, 2011, 03:54:59 PM »
Sounds great!

julius

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Vector3 test?
« Reply #8 on: January 31, 2013, 11:11:09 PM »
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