How to detect non-movement properly?
I'm making a game where you stack freely moving physical objects on top of each other with your imp while trying to reach as much height as possible without it all collapsing. Player also has a free camera movement, so I've put together these 4 conditions for now that go to AND gate (to score and to prevent player from cheating) - 1) object is in the trigger zone 2) object is not being grabbed 3) object is touching something 4) object is not moving. Now while there is no problem with the first 3, the movement sensor acts strange. It detects movement accurately, but when it comes to detecting non-movement (by using the not gate), it somehow still detects non-movement even if the object is moving, for example when I let go of the object close to the ground or when I hold the object in the air in one place with my imp... So my question is - is there a way to set up movement sensor so it detects non-movement accurately? (btw I'm using text displayers to test all these conditions separately & together)
-
Try using a calculator and setting velocity = 0
-
How are you using the movement sensor? It's likely to do with however you are setting it up.
I'd use the overall velocity, check if it's < 0.01. -
To maybe better put my question - just how do I make the movement sensor more sensitive to non-movement when using the NOT gate? Keep in a mind that I'm fairly new to logic, so maybe I'm missing some crucial setting or other gadget to do this - please let me know! Thank you
-
I tried to set this up myself and I think the problem with the not gate is that it sends a partial signal for some reason even when the velocity isn't zero. So if you replace the NOT gate with a calculator set to "equals" and plug the output overall velocity from the movement sensor into input 1 on the calculator, the calculator should output a signal when the object isn't moving.
-
To whoever suggested using a calculator set to equal instead of a not gate - thank you so much! That's exactly what I needed, now it detects non-movement as it should and now I finally finished my scoring system :) meanwhile I added other conditions aswell like non-scratching and non-rolling, but ultimately it was still wonky because of the movement sensor acting weird... Now it works perfectly, so thanks again and check out IMPlaygrounds [WIP demo] https://indreams.me/dream/mVmuManJWMb :)
請登入寫評論。