How do I combine multiple Face Events within a behavior script where both conditions can be met?


I am creating a face designed after an 8-bit pixelated look where I will have different facial expression components as separate images which will be enabled or disabled with mouth movements. This should be fairly simple with some elements such as the brows, as this can be handled with a simple behavior script.

The difficulty comes when handling the mouth, where one could feasibly be both smiling and have one's mouth open. So in an ideal scenario where both conditions are being met, it would show the "open mouth smile" layer rather than the simple "open mouth" layer.

I have no knowledge of programming or scripting, so I am very much out of my depth. Would appreciate any assistance anyone can offer in doing this.

P.S. Is there other face events that I could possibly add in that are not already present? eg. frowning, closing eyes etc. I know these can obviously be tracked because of the face expressions, just not sure how to use that information into a simple toggle for a behavior script.


  • سعد الفريدي
    سعد الفريدي Posts: 447 🔥🔥🔥
  • Bakari Mustafa
    Bakari Mustafa Posts: 178 🔥🔥🔥

    You could begin by looking into basic facial animation techniques such as vertex displacement, blend shapes, and morph targets. These techniques are commonly used to create facial animations and would provide a good foundation for the system you are looking to create.

    In terms of enabling and disabling facial expressions with mouth movements, you could use programming logic to determine when to enable or disable certain facial expressions based on the mouth's position. For example, if the mouth is open, then a particular expression could be enabled.

    In addition to the brows and mouth, you could also add facial expressions related to the eyes, such as blinking and squinting. To do this, you could use a combination of logic and facial tracking algorithms to detect when these expressions are being made and to enable the appropriate animation.

    I hope this information was helpful