๐Ÿ‘‹
Auto Hand Docs
  • ๐Ÿ™ŒAuto Hand
    • โ€ผ๏ธAuto Hand V4 What's-New
    • โšกSetup
    • ๐Ÿ—’๏ธFAQ
    • โ‰๏ธCommon Issues
    • ๐ŸงคSetup New Hand
    • ๐ŸŽฎController Input
      • โœŠHand Input
      • ๐ŸคŸHand Tracking Input
      • โœŒ๏ธFinger Pose Input
      • ๐ŸƒPlayer Input
      • ๐Ÿ—’๏ธGeneral Input / UI Pointer Input
      • ๐Ÿ‘ˆDistance Grabber Input
      • โšกTeleport Input
      • ๐ŸŽAdditional Input
    • ๐Ÿ–๏ธHand
      • ๐Ÿ”ฆGrabbable Highlighter
      • ๐Ÿ‘‹Hand Follow
      • ๐ŸซณHand Animator
      • โ˜๏ธFinger Component
      • ๐ŸงคHand Projector
    • ๐Ÿ––Hand Tracking
      • ๐Ÿ‘ŒHand Tracking Finger Gesture Tracking
      • ๐Ÿ‘ˆHand Tracking Pose Gesture Tracking
    • โœ๏ธCustom Poses
      • ๐ŸฆพHand Pose Data
      • โœ‚๏ธAnimated Held Poses
    • ๐Ÿ…Grabbable
      • ๐ŸงฒDistance Grabbing
    • ๐ŸงบPlace Point
    • ๐Ÿ“คDispenser Point
    • ๐Ÿ›ธTeleportation
    • ๐Ÿ‘ŸAuto Hand Player
    • ๐ŸงFull Body (VRIK)
    • โš’๏ธExtras
      • ๐Ÿ”ซAuto Gun
        • ๐Ÿ’˜Auto Ammo
        • ๐ŸŽฏAuto Gun Target
      • โš™๏ธGrabbable Held Joint
      • ๐ŸŽ›๏ธPhysics Gadgets
        • ๐Ÿ”˜Physics Gadget Button
        • ๐ŸŽš๏ธPhysics Gadget Slider
        • ๐ŸŽ›๏ธPhysics Gadget Lever
      • ๐Ÿ“UI Interaction
      • ๐Ÿ“ฑHand Touch / Trigger
      • ๐Ÿ”จSmashing
      • ๐Ÿ”ชStabbing
      • ๐ŸŽฏStickies
      • ๐ŸงฒMagnetic Forces
      • ๐Ÿ“ขCollision Sounds
      • โŒšWrist Look Event
Powered by GitBook
On this page
  • Dispenser Settings
  • Programming Info
  1. Auto Hand

Dispenser Point

PreviousPlace PointNextTeleportation

Last updated 11 months ago

Dispenser points allow grabbables to be dispensed in predetermined points or areas. A dispenser point will take an object in the scene or a prefab and will allow the player to take copies of that item from the point

Dispenser will hide the given source object and dispense copies. If destroy on reset is disabled the dispenser will automatically pool the dispensed objects, this is more optimized but will not always give the desired results, for example: when dispensing ammo for a gun turning destroy on reset off will cause the already used ammo to be dispensed once the max copies are reached instead of a brand new fully copy

Dispenser Settings

  • Dispense Object The object to be copied and dispensed

  • Max Copies The maximum copies allowed to exist from this dispenser before they are destroyed or pooled

  • Reset Delay Time in seconds before the next dispense appears

  • Disable Body Whether or not objects placed in the dispense point should be set to kinematic on placed or not

  • Is Kinematic Whether or not objects placed in the dispense point should be set to kinematic on placed or not

  • Destroy On Reset If true the object will not be pooled and reset its position on reset it will be destroyed and a new copy will be placed. Less performant but important for things like ammo that should always respawn as new clips full

  • Max Distance The maximum distance a dispensed object can move from the point before the next object is dispensed

On Grab Dispense called when the dispensed object is grabbed

On Dispense called when a new dispensed item is spawned

Programming Info

Connect Dispenser Point events through a custom script

using UnityEngine;
using Autohand;

public class DispenserEventTemplate : MonoBehaviour {
    public DispenserPoint dispenserPoint;

    void OnEnable() {
        dispenserPoint.OnGrabDispenseEvent+= OnGrabDispense;
        dispenserPoint.OnDispenseEvent+= OnDispenseEvent;
    }

    private void OnDisable() {
        dispenserPoint.OnGrabDispenseEvent -= OnGrabDispense;
        dispenserPoint.OnDispenseEvent -= OnDispenseEvent;

    }

    public void OnGrabDispense(DispenserPoint point, Grabbable grab) {
        //Stuff happens when the dispensed grabbbale is grabbed
    }

    public void OnDispenseEvent(DispenserPoint point, Grabbable grab) {
        //Stuff happens when a new object is dispensed, references the new grabbable that appears in a dispenser

    }
}
๐Ÿ™Œ
๐Ÿ“ค