pub struct PointEffector2D {
pub m_AngularDrag: f32,
pub m_ColliderMask: BitField,
pub m_DistanceScale: f32,
pub m_Drag: f32,
pub m_Enabled: u8,
pub m_ForceMagnitude: f32,
pub m_ForceMode: i32,
pub m_ForceSource: i32,
pub m_ForceTarget: i32,
pub m_ForceVariation: f32,
pub m_GameObject: PPtr,
pub m_UseColliderMask: Option<bool>,
}Expand description
PointEffector2D is a class of the Unity engine since version 5.0.0f4. Exert from Unity’s scripting documentation: Applies forces to attract/repulse against a point. When the source Collider2D is a trigger, the effector will apply forces whenever the target Collider2D overlaps the source. When the source Collider isn’t a trigger, the effector will apply forces whenever the target Collider2D is in contact with the source only.This effector is designed primarily to work with source Collider2D that are set as triggers so that target Collider2D can overlap the defined area.
Fields§
§m_AngularDrag: f32The angular drag to apply to rigid-bodies.
m_ColliderMask: BitFieldThe mask used to select specific layers allowed to interact with the effector.
m_DistanceScale: f32The scale applied to the calculated distance between source and target.
m_Drag: f32The linear drag to apply to rigid-bodies.
m_Enabled: u8Enabled Behaviours are Updated, disabled Behaviours are not.
m_ForceMagnitude: f32The magnitude of the force to be applied.
m_ForceMode: i32The mode used to apply the effector force.
m_ForceSource: i32The source which is used to calculate the centroid point of the effector. The distance from the target is defined from this point.
m_ForceTarget: i32The target for where the effector applies any force.
m_ForceVariation: f32The variation of the magnitude of the force to be applied.
m_GameObject: PPtrThe game object this component is attached to. A component is always attached to a game object.
PPtr<GameObject>: (5.0.0f4 - 2022.3.2f1)
m_UseColliderMask: Option<bool>Should the collider-mask be used or the global collision matrix? bool: (5.0.2f1 - 2022.3.2f1)