0
Answered

Y axis Compare Less Than

Steve 2 years ago updated 2 years ago 5

Hello,

Really banging my head against the wall here. Spent way too many hours trying to figure this one out, and I hate to just ask 'how do I do this' but, I'm beyond stuck.

I have to compare a moving game object's Y axis against Y axis -1 and when then are equal or less than, fire an event - or, in this case just debug to Hello World.


or

 

Thanks,

Steve

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
GOOD, I'M SATISFIED

Hi Lazlo,

Thanks for the help! I ended up getting the below to work, but yours is much nicer looking.


Satisfaction mark by Steve 2 years ago
Yeah, I'm just not getting this. 

Answered

You're very close, though! Here's how I would do it.

What do you mean by "a game object's Y axis"? The Y component of its position? If you meant the value of your variable, disregard my Get Position unit at the left.

I think you just missed the Less or Equal unit:


Yes, by the Y axis, I just meant the Y position.

Cheers!

-Steve

Glad you got it working.

I'm not sure what you're trying to do with those state machine units at the right, but I'm sure it won't work. These are some internal methods used by Bolt.

Are you trying to use a State Unit?

I am now! :)

Okay, I was actually using those before, but I wasn't exactly clear.