Hello,
I have a little problem. When I a Pawn with a BoxComponent as Root and have eg. a SphereComponent as child, the childs component collision is removed somehow.
Also, when I add another SphereComponent as child with a different collision object it doesnt have any collision.
What can I do to have my rootcomponent as well as its childs collide with the environment (even with more than 1 objecttype).
They are effectively welded (they don’t move independent from each other but add to the rootcomponents collisionbody).
Are you sure you’re using the right components? You’re looking for BoxCollision and SphereCollision components.
They should behave as intended if they’re given the same collision profile in “Collision”. Go ahead and make sure you’re using the right ones. If you are, would you mind supplying us with some screenshots maybe?
@Mind-Brain Ah sorry yes, I meant the collision components of it (Don’t use blueprints). I need to have two different collision profiles (one for ground, one for wall). Is that even possible?
Hey, sorry, I’m not extremely versed in C++ having not used it in years at this point, blueprint questions keep me pretty busy. Can I just ask though… here:
What’s going on here with this error? Should it be ==? What’s the error returning?
No problem, we can also do this in blueprints. I attached a simple blueprint test project for UE5.1.1. Check out the Blueprints and the collision settings (Blueprint and Project settings). One of the components should only collide with the ground, the other component only with the wall. But it doesn’t.
The underlined error you marked is just because I use the raw ptr in c++ and since UE5 you can use the TObjectPtr which is optional. Visual Studio marks it as error but it is correct, trust me.