🧺Place Point
Place points allow grabbables to be placed in predetermined points or areas. By default place points will accept an item when the player releases it within the place radius, if that item meets the place requirements

Place Settings
Start Placedleave empty if none, will automatically place this object on start regardless of positionPlaced Offsetrepresents the center of the place point. If empty will default to local transformPlaced Radiusis the distance from the placed offset that placement is allowed
Parent on Placeif true, the placed grabbable will be parented under the placed offset on placeForce Placeif true, the place point will automatically place a grabbable (meeting placement requirements) as soon as it enters the place area regardless of whether the object has been released or notForce Hand Releaseif true, the place point will force the hand to drop the object when it's placed in the place point.Even if this is false, hand will sometimes force release grabbable on place if the hand teleports too far from the controller or the grabbable break force is too low
Destroy Object On Placeif true, the placed object will be destroyed on placeDisable Rigidbody On Placeif true, a placed grabbable will lose its rigidbody while being placed in this place point (adds rigidbody back when grabbed again)Disable Grab On Placeif true, a placed grabbable will no longer be grabbable after placed in this place pointDisable Place Point On Placeif true, the place point will be deactivated after an object is placed and the place point and will no longer be useable (unless reenabled)
Make Placed Kinematicif used, this will set the placed objects rigidbody to be kinematic while in the place pointPlaced Joint LinkIf used, this will create a fixed joint between the placed object and the included rigidbody on place (will not work withMake Place Kinematic)Joint Break Force(if using the placed joint link) the joint break force to use on the placed joint link
Place Requirements
Name Compare TypeNamewill compare the objects name to the place names and blacklist names to check if placement is allowedTagwill compare the objects tag to the place names and blacklist names to check if placement is allowed
Place Nameswill compare the attempted placed object (based on the compare type) to all the names/tags in this list to see if they will be allowed placement.If it's a name comparison it will check if the name CONTAINS the included word, for example blue will allow object named blue_car to be placed
Blacklist Nameswill compare the attempted placed object (based on the compare type) to all the names/tags in this list to see if they will NOT be allowed placement.If it's a name comparison it will check if the name CONTAINS the included word, for example car will NOT allow object named blue_car to be placed
Only Allowsif used, place point will only accept grabbables included in this listDont Allowsif used, place point will not accept grabbables included in this listPlace Layersonly allows objects in these physics layers to be placed. By default if set to Nothing will be set to Grabbable on start. (Setting to Everything is not recommended as it is more expensive)Held Place Onlyif true the placement is only allowed while the grabbable is being held or released by a hand
Events

On Place occurs when a valid placement happens
On Remove occurs when a placed object is grabbed.
On Highlight occurs when a valid object enters a place area before it's released and placed
On Stop Highlight occurs when a valid object leaves a place area
Programming Info
Place Points are also manageable though code with these functions
//Will accept a grabbable, if "CanPlace()" flag is cleared and nothing is currently place
placePoint.Place(Grabbable grabbable)
//Removes what is in it, if it matches the current placeObject
placePoint.Remove(Grabbable grabbable)
//Getter for the current place object in the place point -> returns null if none
placePoint.placedObject
//Getter for the current highlight object in the place point -> returns null if none
placePoint.highlightingObjConnect Place Point events through a custom script
using UnityEngine;
using Autohand;
public class PlacePointEventTemplate : MonoBehaviour {
public PlacePoint placePoint;
void OnEnable() {
placePoint.OnPlaceEvent += OnPlace;
placePoint.OnRemoveEvent += OnPlace;
placePoint.OnHighlightEvent += OnHighlight;
placePoint.OnStopHighlightEvent += OnStopHighlight;
}
private void OnDisable() {
placePoint.OnPlaceEvent -= OnPlace;
placePoint.OnRemoveEvent -= OnPlace;
placePoint.OnHighlightEvent -= OnHighlight;
placePoint.OnStopHighlightEvent -= OnStopHighlight;
}
public void OnPlace(PlacePoint point, Grabbable grab) {
//Stuff happens when placed
}
public void OnRemove(PlacePoint point, Grabbable grab) {
//Stuff happens when placed was removed
}
public void OnHighlight(PlacePoint point, Grabbable grab) {
//Stuff happens when placepoint was highlighted
}
public void OnStopHighlight(PlacePoint point, Grabbable grab) {
//Stuff happens when placepoint was done highlighting
}
}Last updated