ClimbableComponent

Specifies the area for climbing action.

# Properties

[{"index":"boolean AllowHorizontalMove","0":"Sets whether or not to move freely. If true, both X and Y axes are movable."}]

[{"index":"Vector2 BoxOffset (Sync)","0":"Sets the center point position of the collider rectangle based on Entity. Setting IsUseDefaultObjectBoxSize to false can apply BoxOffset."}]

[{"index":"Vector2 BoxSize (Sync)","0":"Specifies the width and height of the collider rectangle. Setsting IsUseDefaultObjectBoxSize to false can apply BoxSize."}]

[{"index":"ClimbableType ClimbableAnimationType","0":"Determines the animation type when climbing."}]

[{"index":"CollisionGroup CollisionGroup (ReadOnly) (HideFromInspector)","0":"A group of collisions in the climbing area."}]

[{"index":"boolean IsUseDefaultObjectBoxSize","0":"Sets whether to fit the climbing area settings to the sprite size. Operates only in Maker Editing mode. If true, automatically sets the area to fit the Boxsize and BoxOffset according to the sprite size. If false, you can set the Boxsize and BoxOffset arbitrarily."}]

[{"index":"boolean LockMovementInBoundary","0":"Set if movement will only be limited with a climbable area. If true, you can only leave the climbable area from the start and end points. Only valid when AllowHorizontalMove is true."}]

[{"index":"Vector2 SpeedFactor","0":"When climbing, this value is multiplied to the speed traveled in the X or Y direction. The greater the value, the faster the movement."}]

##### inherited from Component:

[{"index":"boolean Enable (Sync)","0":"Checks whether Component is activated or not."}]

[{"index":"boolean EnableInHierarchy (ReadOnly) (HideFromInspector)","0":"Displays whether this Component is Enable in the hierarchy. If Entity Enable is false regardless of Component Enable, returns false."}]

[{"index":"Entity Entity (ReadOnly)","0":"The Entity that owns this component."}]

# Methods

##### inherited from Component:

[{"index":"boolean IsClient()","0":"Returns whether the current execution environment is a client or not."}]

[{"index":"boolean IsServer()","0":"Returns whether the current execution environment is a server or not."}]

# Examples

This is an example where `BoxSize` and `SpeedFactor` of `ClimbableComponent` change based on the name of the colliding entity when `TriggerEnterEvent` occurs.
    
    
    @Component
    script ClimbableTriggerAdjuster extends Component
        @ExecSpace("ServerOnly")
        method void ChangeBoxSize(Vector2 boxSize)
        local entity = _EntityService:GetEntityByPath(EntityPath)
        entity.ClimbableComponent.BoxSize = boxSize
        end
    
        @ExecSpace("ClientOnly")
        method void ChangeSpeedVector(Vector2 speedVector)
        local entity = _EntityService:GetEntityByPath(EntityPath)
        entity.ClimbableComponent.SpeedFactor = speedVector
        end
    
        @ExecSpace("ServerOnly")
        @EventSender("Self")
        handler HandleTriggerEnterEvent(TriggerEnterEvent event)
        --------------- Native Event Sender Info ----------------
        -- Sender: TriggerComponent
        -- Space: Server, Client
        ---------------------------------------------------------
    
        -- Parameters
        local TriggerBodyEntity = event.TriggerBodyEntity
        ---------------------------------------------------------
    
        if TriggerBodyEntity.Name == "Name" then
        	self:ChangeBoxSize(Vector2(3, 10))
        elseif TriggerBodyEntity.Name == "Name" then
        	self:ChangeSpeedVector(Vector2(1, 2))
        end
        end
    end
    

# SeeAlso

  * EntityService
  * [Using Ladders and Rope](/docs?postId=809)