What's wrong with my collision component and mesh component?

I’ve made a first person Code project. I have made a UBoxComponent for collision component and a UStaticMeshComponent for mesh. I have set root component to collision component and attached mesh component to RootComponent but for some reason when i shoot mesh, mesh gets hit by projectile and moves with physics (which is normal) but collision component doesnt move or do anything. Is this normal?

I dont think i explained very well but i tried sorry.

Screenshot of my header file

Screenshot of my source file

Hey Rexidia,

Could you show us some screenshots of your Blueprint components’ settings, as well as class’ .h and .cpp files? Thanks!

This is a screenshot of problem. smaller white box is my mesh and transparent box is my collision component which should be attached to mesh?

You have turned on Simulate physics on MeshCompoenent only. Why dont you try turning that on for root component (collision) instead?

I just enabled Simulate Physics for BaseCollisionComponent instead and as soon as i click play they both go shooting into sky (i think they are connected now though).

I dont think i quite understand how they both work together are there any tutorials?

I’ve managed to fix it by changing BaseCollisionComponent to simulate physics instead of Mesh and by changing collision presets around in blueprint. Thanks for help :slight_smile:

There you go then :wink: :smiley:

I have found a similar problem. Just check this out and inform us :wink:


Try to add following:


Hey Rexidia,

It’s usually best to have physics on your collision component rather than mesh, and you don’t usually use physics on both at same time (or you run into fun interaction problems like one you saw). If you take a look at how character class is constructed in one of templates, you’ll see something similar to what you ended up with in your answer above.

Just wanted to add a little clarity to that for you. Best of luck with your project!