I’m trying to create a projectile in Unreal Engine, and I’m unsure which root component to use. What’s the real difference between using a ‘Sphere Collision’ versus the ‘StaticMesh’ itself? When I use the ‘Sphere Collision’ as the main component, it moves, but ‘StaticMesh’ doesn’t.
May not matter, may matter a lot. Afaik, there are internal optimisations for basic shapes - spheres/boxes/capsules. The static mesh may be using one of them, or it may be using a more complex shape - which would be less performant. Depends on what you set the collider to - open the mesh, visualise the collider.
It’s quite common to use a sphere/box collision as the root and then add a non-colliding mesh as a child component - you get more flexibility this way.
I had to do weirdly shaped fish projectiles recently. A sphere / box root collider wouldn’t work too well because of the shape. And it was too time consuming to hand-craft many collisions from basic shapes. I slapped a 26DOP on it and it worked more than fine:
Was it optimal? No. Could it be done better? Sure thing. In the same time-frame? No way.
When I use the ‘Sphere Collision’ as the main component, it moves, but ‘StaticMesh’ doesn’t.
It does not matter. You’re simply not using the projectile correctly in the last pic. Do not set actor location on Tick - you’re undoing what the PMC is trying to do. You have a movement component - let it do its job.
This actually looks like the ancient bug that manifest when you mess around with the root component attachments. I generally throw the actor out of the window at this point, and make a new one.