Running through a series of 'Check Angle' nodes, 'From' Actor 0 'To' Prefab 0 (my mouse cursor object), and set to look for 'Range Inclusive' values between 45 degree intervals, I find that all of the angle ranges to the left of my Actor object will always fail. Whether I set them to be range inclusive between...

180-225

225-270

270-315

315-360

*...or...

0-(-45)

(-45)-(-90)

(-90)-(-135)

(-135)-(-180)

...everything always fails past 180 degrees. And I know this because I linked a String Variable to the 'Fail' exit path of my final 'Check Angle' node that says, "Fail," ergo it must be true. Everything between 0-180 appears to work as intended, however, so I know, at the very least, I'm on one half of the right track. What's the magic word, then, to get the other half of this puzzle working?
  • Are you using Use Direction and what's your Horizontal Plane?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • "Are you using Use Direction and what's your Horizontal Plane?"

    XY is my horizontal plane, and I'm not using 'Use Direction'. The description made 'Use Direction' seem like it would factor in how both objects were facing, which could lead to messy results.
  • edited June 2019
    I'll do some tests.

    Edit: Tested it and works, but you need to check in a range of -180 to 180, not 0 to 360.
    And you need to check it in min to max value, e.g. instead of 0 to -45, you need to set it up as -45 to 0.
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Awesome, thanks! Incidentally, If I were to check the box for 'Use Direction,' would the format then differ? From the description this appears to check the facing angles of two objects in relation to one another.
  • I think the check range would still be -180 to 180, the source of the angle comes from the directions they're looking to.
    E.g. if both look into the same direction, the angle would be 0, if one looks forward one left, the angle would be 90 (or -90), etc.

    There is also the Check Orientation node for checking if an object is in front, left, right or back of another object.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • "There is also the Check Orientation node for checking if an object is in front, left, right or back of another object."

    Right, that's kind of what I was thinking. It seems safer to do one and then the other than try and figure out both at once. I think that answers my question, though. Thanks.
Sign In or Register to comment.