Why is the collision box for my static mesh offset from the actual mesh?

I have a big hollow static mesh box I am trying to use as the collision bounds for my camera/character. In the mesh editor I have set the collision and the green box neatly outlines the mesh.

When I get into the game however, the actual collision takes place in a way that makes it seem as if the bottom right corner of the collision box is in the middle of my hollow mesh.

I have used all the collision types including sphere, and even the sphere is offset.

It doesn’t matter if I spawn the mesh in my level or physically drop it in.

If you are trying to create a collision for the set of objects, your mesh and your camera, the best way to do this is in the Blueprint for the set of objects. You should only be handling collisions for a static mesh in the mesh editor (as far as I have seen).

Check this out… I have the sample character from one of the examples and they use a Capsule Shape component as the general collision for the player. You could do the same but use your cube or whatever shape and simply move/rotate it to fit your needs. The player skeletal mesh also has collision handling, but this is separate.

The collision box is supposed to be a kind of arena for the player camera. It is supposed to be an invisible wall that keeps the player in the middle. IE above the hex map.

Maybe there is some ridiculous separation between my camera and my player pawn. I will have to take a look at that in the morning.

Hmmm. I’m not really sure what you mean here. If you mean what I think, and that you are trying to keep your player/camera inside some boundary. Is this for the whole map? Is the boundary dynamic with the character movement?

I have a map that generates say 1725x by 1000y. This is a turn based strategy world map, like in civilization.

The boundary box is supposed to keep the player pawn, which floats above the map and can move around, from moving off into the void beyond the map.

For some reason, the collision on this box seems to be offset from the actual rendered box.

Ok, so my camera was something like a thousand units from my capsule… I must have been drunk when I worked that out however many weeks ago… :stuck_out_tongue:

Your picture that showed the camera and the capsule next to each other is what gave me the idea that their separation might be the problem, thanks!

Now my hollow collision box is kicking my player out of the box(and then can’t get back in), but that is a separate issue so I will create a different question for that if needed.

If anyone sees this, you need to use complex collision on a hollow box to get collision to work. With simple collision it wants to kick you out of it’s bounds.

I thought about this for a bit, and came up with what I feel is a reasonable explanation. Short answer is that you might want to start centering your meshes on the origin instead of standing them on the XY plane. Long answer and reasons why are in my answer to my own question.

As I explained in my comments to the accepted answer above, my camera was not in the same location as my player pawn. Thanks.