Mesh SlideBehavior and SwingBehavior triggered by touch, proximity and/or manually

Someone else might find this useful. I created 2 new mesh behaviors suitable for the animated opening/closing of doors, windows, drawers etc, SlideBehavior and SwingBehavior triggered by pointer touch, proximity and/or manually. Slide along or swing around any axis.

So the idea is that you can simply attach these behaviors to complex imported door/window meshes for rapid interactivity.

  • Global enabled (lock): isEnabled
  • Touch trigger: isPickingEnabled
  • Proximity trigger: isProximityEnabled
  • Manually open: open()
  • Manually close: close()
  • Observables to trigger related events like sounds etc: onOpenObservable and onCloseObservable

SwingBehavior example usage:

SlideBehavior example usage:

8 Likes