(Redirected from SnapSphere (Component))
Component image
A snap sphere is a component that is able to generate a point in a sphere shape along the outer shell when given a point by another component. Usually this is used in components like the Multi User Avatar Anchor Component to determine where to place the anchors upon clicking (click point is used in such case)
How the snapper determines a point is as such:
- the snapper component will reduce the distance from the provided point to the center of the snapper to a distance of 1.
- It then takes the number and aligns it to the closest point on the shape. since this is a sphere snapper, it doesn't need this step.
- the snapper will then multiply the normalized point by the snapper's size in all 3 axes, and then return the result.
The functionality of this component is internal, and cannot be used by ProtoFlux to snap points using in game code.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
Radius
|
Float | the radius of the sphere |
SnapParent
|
Slot | where the objects to be snapped should go, if they are slots. |
Usage
Used as an anchor point generator in the Multi User Avatar Anchor Component and drawing tools.