Search Results for

    Show / Hide Table of Contents

    Class KCCUtilsScenarioTests

    Test basic movement scenarios for KCC Scenarios.

    Inheritance
    Object
    KCCUtilsScenarioTests
    Namespace: nickmaltbie.OpenKCC.Tests.PlayMode.Utils
    Assembly: cs.temp.dll.dll
    Syntax
    public class KCCUtilsScenarioTests : TestBase

    Fields

    characterPush

    Character push associated with the player.

    Declaration
    public ICharacterPush characterPush
    Field Value
    Type Description
    ICharacterPush

    playerColliderCast

    Collider cast associated with the player.

    Declaration
    public CapsuleColliderCast playerColliderCast
    Field Value
    Type Description
    CapsuleColliderCast

    playerPosition

    Position fo the player.

    Declaration
    public Transform playerPosition
    Field Value
    Type Description
    Transform

    Methods

    CreateKCCConfig()

    Create a KCCConfig with default parameters.

    Declaration
    public KCCConfig CreateKCCConfig()
    Returns
    Type Description
    KCCConfig

    GetBounces(Vector3, IKCCConfig)

    Get the bounces for character movement from current position.

    Declaration
    public IEnumerable<KCCBounce> GetBounces(Vector3 movement, IKCCConfig kccConfig = null)
    Parameters
    Type Name Description
    Vector3 movement

    movement of teh player

    IKCCConfig kccConfig

    Configuration for the movement.

    Returns
    Type Description
    IEnumerable<KCCBounce>

    Character bounces for player given current movement.

    MovementGenerator()

    Generate basic set of movements.

    Declaration
    public static IEnumerable<Vector3> MovementGenerator()
    Returns
    Type Description
    IEnumerable<Vector3>

    Set of 9 possible movements.

    PushOutOverlapping()

    Test that the player will not move when overlapping with objects.

    Declaration
    public IEnumerator PushOutOverlapping()
    Returns
    Type Description
    IEnumerator

    Enumerator of unity events for the test.

    SetUp()

    Setup and create game objects for the test.

    Declaration
    public void SetUp()

    TestKCCMovementJitterOnAngle(Single, Single)

    Evaluate and test for player jitter when moving against an angled wall. When the player hits the wall, their consecutive movements should NOT make them jitter back and forward due to sliding between the angle.

    Declaration
    public IEnumerator TestKCCMovementJitterOnAngle(float angle, float wallLength)
    Parameters
    Type Name Description
    Single angle

    Angle of wall to test player jitter against.

    Single wallLength
    Returns
    Type Description
    IEnumerator

    Enumerator of unity events for the test.

    TestPushBox(Single, Boolean, Boolean, Boolean)

    Basic test of player walking forward.

    Declaration
    public IEnumerator TestPushBox(float distance, bool isKinematic, bool isPushable, bool addRigidbody)
    Parameters
    Type Name Description
    Single distance
    Boolean isKinematic
    Boolean isPushable
    Boolean addRigidbody
    Returns
    Type Description
    IEnumerator

    TestSlideOffWall(Single, Single)

    Basic test of player sliding off wall.

    Declaration
    public IEnumerator TestSlideOffWall(float yaw, float pitch)
    Parameters
    Type Name Description
    Single yaw
    Single pitch
    Returns
    Type Description
    IEnumerator

    TestWalkForward(Vector3)

    Basic test of player walking forward.

    Declaration
    public void TestWalkForward(Vector3 movement)
    Parameters
    Type Name Description
    Vector3 movement

    TestWalkIntoWall(Single)

    Basic test of player walking into an object.

    Declaration
    public IEnumerator TestWalkIntoWall(float distance)
    Parameters
    Type Name Description
    Single distance
    Returns
    Type Description
    IEnumerator

    TestWalkUpStairs(Single, Single, Int32, Single, Single[], Single[])

    Test basic movement scenarios for KCC Scenarios.

    Declaration
    public IEnumerator TestWalkUpStairs(float stepHeight, float width, int numSteps, float stepDepth, float[] snapHeightRange, float[] snapDepthRange)
    Parameters
    Type Name Description
    Single stepHeight
    Single width
    Int32 numSteps
    Single stepDepth
    Single[] snapHeightRange
    Single[] snapDepthRange
    Returns
    Type Description
    IEnumerator
    In This Article
    Back to top OpenKCC Documentation