Class CapsuleColliderTests | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class CapsuleColliderTests

    Class collecting all tests for the CapsuleCollider

    Inheritance
    System.Object
    CapsuleColliderTests
    Namespace: Unity.Physics.Tests.Collision.Colliders
    Syntax
    public class CapsuleColliderTests

    Methods

    TestCapsuleColliderCalculateAabbLocal()

    Test if the local AABB of the CapsuleCollider is calculated correctly.

    Declaration
    public void TestCapsuleColliderCalculateAabbLocal()

    TestCapsuleColliderCalculateAabbTransformed()

    Test whether the AABB of the transformed CapsuleCollider is calculated correctly.

    Declaration
    public void TestCapsuleColliderCalculateAabbTransformed()

    TestCapsuleColliderCreate()

    Test if all attributes are set as expected when creating a new CapsuleCollider.

    Declaration
    public void TestCapsuleColliderCreate()

    TestCapsuleColliderCreateInvalid()

    Test if CapsuleCollider throws expected exceptions when created with invalid arguments

    Declaration
    public void TestCapsuleColliderCreateInvalid()

    TestCapsuleColliderMassProperties()

    Test whether the inertia tensor of the CapsuleCollider is calculated correctly.

    Declaration
    public void TestCapsuleColliderMassProperties()
    Remarks

    Used the formula from the following article as reference: https://www.gamedev.net/articles/programming/math-and-physics/capsule-inertia-tensor-r3856/ NOTE: There is an error in eq. 14 of the article: it should be H^2 / 4 instead of H^2 / 2 in Ixx and Izz.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023