Access to Collider in a Character Class

So I built a character Controller based on the Character Class. Now I have to do two things

  1. I have to access the collider inside the code to filter what my player can collide with and not. I tried to acces with a UCapsuleComponent but VS told me that I cant access the normal collider functions
  2. i wanna delete the standart mesh that is given to the character class
    thx for helping

For the ACharacter collider, which is the Capsule, you have to use the functionGetCapsuleComponent(). The skeletal mesh is retrieved likewise with GetMesh(), then it seems like SetSkeletalMeshAsset(USkeletalMesh *) might be the function you need from that component.

The reason this works is that properties are private scope but the getters are not.

You can review the full API here: ACharacter | Unreal Engine 5.5 Documentation | Epic Developer Community

So
I have the problem that when I try to use my CapsuleComponent I get the error: “C++ pointer or reference to incomplete type is not allowed” I can sed you my code if that helps:
include “U_PlayerController.h”
include “Camera/CameraComponent.h”

// Sets default values
AU_PlayerController::AU_PlayerController()
{
// Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don’t need it.
PrimaryActorTick.bCanEverTick = true;

Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("Main Camera"));
Camera->SetupAttachment(RootComponent);
Camera->SetRelativeLocationAndRotation(FVector(-750, 0, 1000), FRotator(-45, 0, 0));

PlayerCollider = GetCapsuleComponent();
PlayerCollider->SetCollisionResponseToChannel("doesnt matter for now :D");

Got the Soluten: You have to include include “Components/CapsuleComponent.h” :smiley: