Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


articulationBody

The ArticulationBody of the collider that your GameObject collides with (Read Only).
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
public ArticulationBody articulationBody { get; }

Remarks

This returns the ArticulationBody of the collider that your GameObject collides with. If the collider doesn't have an articulation body attached, this returns
null
.

Examples

using UnityEngine;public class ExampleScript : MonoBehaviour{ // Make all articulation bodies that your GameObject hits fly upwards void OnCollisionStay(Collision collision) { // Check if the collider your GameObject hits has an articulation body // Then apply the force if (collision.articulationBody) { collision.articulationBody.AddForce(Vector3.up * 15); } }}