Character Controller Pro (1.4.x)
  • Introduction
  • The package
    • Content
    • Versioning scheme
    • Importing the package
    • Using the package
    • Known issues
  • Fundamentals
    • Core
      • Character
      • Character body
      • Character actor
        • States
        • Stable movement features
        • Velocity
    • Implementation
      • Character state controller
      • Character state
      • Character brain
  • How to...
    • Core
      • Create a basic character
      • Add behavior logic to your character
      • Move the character
      • Rotate the character
      • Leave grounded state (e.g. jump)
      • Change the size of the character
      • Disable collisions (ghost)
      • Use the character information (with examples)
      • Use root motion
      • Detect a character using a "detector"
      • Add a static one way platform
      • Add a dynamic one way platform
    • Implementation
      • Organize the character hierarchy
      • States
        • Add and configure the state machine
        • Create a state
        • Transition from one state to another
        • Handle animation
        • Modify an IK (inverse kinematics) element
      • Actions
        • Define your own actions
        • Use the character actions
        • Use a custom Input Handler
        • Use the new input system
        • Create your own AI movement logic
Powered by GitBook
On this page
  • 1. Create a static one way platform
  • 2. Add a Rigidbody
  • 3. Add a DynamicOneWayPlatform component
  • 4. Make it move
  1. How to...
  2. Core

Add a dynamic one way platform

PreviousAdd a static one way platformNextImplementation

Last updated 2 years ago

The process is very similar as the one for static one way platforms. However, there are a few important things to consider:

1. Create a static one way platform

(follow ).

2. Add a Rigidbody

Add a Rigidbody (Rigidbody2D) component to the platform. One way platforms should be kinematic, make sure to enable the isKinematic property.

3. Add a DynamicOneWayPlatform component

This component is responsible for re-simulating the platform physics and detecting multiple characters (using a BoxCast). It will automatically detect the BoxCollider component (whether is 2D or 3D) and Rigidbody component (whether is 2D or 3D).

The component itself exposes a layer mask that should be used to filter the collision results. Make sure to specify all the layers with characters on them (or leave it like that, "Everything" is set by default).

Here's an example of a dynamic 3D one way platform (with no movement behaviour).

4. Make it move

Once you have everything set up, it is time to add the movement behaviour. You can choose whatever method you want, using a custom script, using CCP's platform behaviours (e.g. ActionBasedPlatform), etc.

these instructions