Class ProxyRegionForcePlane2D
Applies a planar region attraction force to the proxy at its origin.
Implements
Inherited Members
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.MARS.Forces
Assembly: Unity.MARS.dll
Syntax
[HelpURL("https://docs.unity3d.com/Packages/com.unity.mars@2.0/manual/ReferenceGuideForces.html#region---plane2d-proxyregionforceplane2d")]
[RequireComponent(typeof(ProxyForces))]
[ComponentTooltip("Applies a planar region attraction force to the proxy at its origin")]
[MonoBehaviourComponentMenu(typeof(ProxyRegionForcePlane2D), "Forces/Region Planar Force")]
public class ProxyRegionForcePlane2D : MonoBehaviour, IMatchAcquireHandler, IMatchUpdateHandler, IMatchLossHandler, IAction, ISimulatable, IUsesMARSTrackableData<MRPlane>
Properties
KeepMatchPlane
When enabled within a plane proxy, only is attracted to the matched plane.
Declaration
public bool KeepMatchPlane { get; set; }
Property Value
Type | Description |
---|---|
bool |
planeAlignment
Alignment the plane should be attracted towards
Declaration
public MarsPlaneAlignment planeAlignment { get; set; }
Property Value
Type | Description |
---|---|
MarsPlaneAlignment |
planeSize
Size on the 2d plane in meters
Declaration
public Vector2 planeSize { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Methods
OnMatchAcquire(QueryResult)
Called when a query match has been found
Declaration
public void OnMatchAcquire(QueryResult queryResult)
Parameters
Type | Name | Description |
---|---|---|
QueryResult | queryResult | Data associated with this event |
OnMatchLoss(QueryResult)
Called when a query match has been lost
Declaration
public void OnMatchLoss(QueryResult queryResult)
Parameters
Type | Name | Description |
---|---|---|
QueryResult | queryResult | Data associated with this event |
OnMatchUpdate(QueryResult)
Called when a query match's data has updated
Declaration
public void OnMatchUpdate(QueryResult queryResult)
Parameters
Type | Name | Description |
---|---|---|
QueryResult | queryResult | Data associated with this event |
UpdateFromSources()
Declaration
public void UpdateFromSources()
UpdateRegionDefinitionWithin(ProxyForces)
Declaration
public void UpdateRegionDefinitionWithin(ProxyForces proxyForces)
Parameters
Type | Name | Description |
---|---|---|
ProxyForces | proxyForces |