Skip to main content

Mouse & Key Toggle Property

This property allows you to easily reverse the animation of an event so each time you use a mouse or key event it’s going to switch from one state to another. This is useful to create interactions like toggle buttons.

How to use the Toggle property in Mouse and Key events:

  1. Select the object and add new states to it using the States panel. You can change the position or how it looks accordingly.

  2. On the Events panels, add one of the following events that support toggle mode for the transition action: Mouse Down, Mouse Up, Key Down, Key Up, Collision, or Trigger Area.

  3. Add a transition action to the Mouse Down event, and change the target object if needed.

  4. Change the mode to β€œToggle” - This will enable you to do the reverse when the object is clicked.

  5. Add the transition steps to the action that you want to toggle between.

  6. That’s it - Enter Play Mode to test.

Test it! Press the switch above πŸ‘†

Click the link to learn how to create this 3D Switch design: Watch YouTube Tutorial