Why does the capsule radius and height wont change ?

I’m trying to change the size of the capsule for a “Point Pickup”
At the moment, I can’t change the parent’s capsule height in both c++ and in the properties tab, I can only change the capsule size properties of both from the editor…
Unless I’m misunderstanding something, I should be able to change the size and radius from the child by calling the inherited component.
I tried creating a new capsule component for the child but now i have a component on top of the current one. (same is happending wih my player character.)

How can I change those properties?

Pickup Parent class

Child class with the capusule created (2 capsules issue)

Same happens with the Player character (I kow thre are two instances of half height and radius, but none of those work)

Player Character’s editor view

CDO Default Constructors are when you will not change or override the components created there anywhere else (in any other derived class). Seems exactly like what you’re trying to do.

Instead, use the FObjectInitializer constructor. Characters build their own capsules. So you need to grab it and set the properties on it instead of creating a new one. I think you could stop the base class from creating it by calling a function on the initializer argument, but that can get weird.

edit: Found this link that might help you as well. You’ll need to scroll down, but there’s a section there about constructors and how to override parent components.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.