explain snap sphere, no longer stub |
add example |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
{{Infobox Component | {{Infobox Component | ||
|Image=SnapSphereComponent.png | |Image=SnapSphereComponent.png | ||
Line 11: | Line 10: | ||
How the snapper determines a point is as such: | 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. | The functionality of this component is internal, and cannot be used by [[ProtoFlux]] to snap points using in game code. | ||
Line 26: | Line 25: | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == Usage == | ||
Used as an anchor point generator in the [[Component:MultiUserAvatarAnchor|Multi User Avatar Anchor Component]] and | Used as an anchor point generator in the [[Component:MultiUserAvatarAnchor|Multi User Avatar Anchor Component]] and drawing tools. | ||
<!--T:4--> | <!--T:4--> |
Latest revision as of 19:05, 29 February 2024
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.