playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - terri

Pages: 1 ... 24 25 [26]
376
EDIT: I found a custom Vector3 compare class so I think I have solved my problem, but my question stands if anyone has time to suggest a solution. It might come up some other day.

Hey, I am new to Unity, Playmaker and programming in general so I realize its probably a very basic question, but I have been trying different things for some time now and no luck.

I have a vector3 for the player's movement. I would like to check if he is moving or not. For this I converted the X and Z into floats (the Y is always zero in my case). It would be great to have a Vector3 compare action but I couldn't find it.

Then I have both the X and Z floats on a Float Compare action (each on his own action), the second float as zero, and I send the event "moving" on both greater than and less than on both.

That causes and infinite loop. If I remove the Z float compare it works fine with just the X, but then if the player is moving only in the Z axis I can't tell.

What would be the best way to solve this? I can't add them I think since they can zero each other out (the Z can be at -25 while the X at 25).

Basically what I need is "if (x>0 and x<0 and z<0 and z>0) {movement}".


Here is what I have, if my words were confusing: https://dl.dropbox.com/u/226993/Screen%20Shot%202013-02-07%20at%208.00.49%20PM.jpg

Pages: 1 ... 24 25 [26]