Possible to catch objects with the open mouth?
I´d like to make a game where the user needs to catch healthy food that is falling down with his mouth - AND he must not catch catch the unhealthy food as this would subtract from his highscore.
QUESTION: is it possible to count only those objects that pass my opened mouth in contratst to just trigger the counter in general as I open the mouth? How can I make sure that I (or rather the counter) misses objects that are not exactly positioned in front of my open mouth?
I hope that I could outline my idea understandable. Maybe you can point me to games that are working just like what I have in mind...
Thank you very much
Cheers eL
Hi eL Be,
The easiest way to do this is with a simple distance check. Try this script out:
Put this script on your falling object, then create a head binding and set the attachment point to "Mouth Center" and set it as HeadBinding.
This script basically just finds the x,y distance from the object to the mouth whenever the mouth opens, and only prints the message if the distance is small enough.
If this doesn't work for you, you can also use screen space distance but that is a little more complicated. Let me know if you have any questions!
Jacob
Hi Jacob, thank you very much. For now, the client cancelled his request - that´s why i returned to the forum only now; but I will still try this solution.
Thank you
Cheers eL
Yes its a possible task I also watched this type of lenses on snapchat you can see here some examples about these lenses guidance.