Vector3 End { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The End property of the CapsuleCollider class represents the top point of the capsule in 3D space. It is defined as a Vector3, which specifies the position of this point relative to the object's local coordinate system.

Usage

To use the End property, you can get or set its value to define the top point of the capsule collider. This is useful for adjusting the size and position of the capsule within the scene.

Example

// Example of setting the End property of a CapsuleCollider
CapsuleCollider capsuleCollider = new CapsuleCollider();
capsuleCollider.End = new Vector3(0, 1, 0); // Sets the top point of the capsule to (0, 1, 0)