Class ProxyRegionForcePlane2D
Applies a planar region attraction force to the proxy at its origin.
Namespace: Unity.MARS.Forces
Syntax
public class ProxyRegionForcePlane2D : MonoBehaviour, IProxyRegionForceSource, 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 |
---|---|
Boolean |
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 |
Implements
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 |
Implements
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 |
Implements
UpdateFromSources()
Declaration
public void UpdateFromSources()
UpdateRegionDefinitionWithin(ProxyForces)
Declaration
public void UpdateRegionDefinitionWithin(ProxyForces proxyForces)
Parameters
Type | Name | Description |
---|---|---|
ProxyForces | proxyForces |