TK_GrabComponent - golden-coconut-studio/TikiAdventuresWiki GitHub Wiki

  • This components allows to grab another Tiki, Enemy or Object and put it above the player.

  • How to use it:

      0.- Add the component to a Tiki.
     
      1.- Call "CheckGrabbableObjectOverlap" function from the CapsuleTotemCollider "OnComponentBeginOverlap" event, passing as arguments OtherActor and the boolean variable "OverlapExit" set to false.
    
      2.- Call from an InputEvent the Grab function.
    
      3.- Call "CheckGrabbableObjectOverlap" function from the CapsuleTotemCollider "OnComponentEndOverlap" event, passing as arguments OtherActor and the boolean variable "OverlapExit" set to true.
    
  • Conditios for grabbing something:

      - Not being falling (!CharacterMovement->isFalling).
    
      - The actor we want to grab, if Tiki, must not be falling (!CharacterMovement->isFalling).
    
      - The actor we want to grab has to implement UITK_Grabbable interface.
    
      - At least one actor implementing that interface must be near (GrabObjectsOnOverlap.Num() > 0).
    
      - Not having any Tiki, Enemy or GrabbableObject above us.