despite the static mesh having collision it doesn’t collide when the player character possesses it
You must have a colliding component at the root of the actor for the movement component to do its thing - there is none. Either drag the mesh there or add a collider and place it where the DefaultSceneRoot
is.
can you elaborate on both options?
You may want to have a collider that is different from the mesh. Look at the character BP. It’s using a capsule to approximate collision rather than rely on the character’s body parts as that would be too computationally expensive or inconvenient, or unnecessary.
You may have a car with a long antenna sticking out, if you used that for collision, the car would not be able to get under the bridge. You can use another collider - a simple box that roughly envelops the car’s bodywork, ignoring the antenna. That actor would use the box to collide, not the mesh itself.
The crux here is that the pawn movement component only looks at what’s at the root of the actor to calculate sliding collision. The collider should be placed there.
i can easily add a box collision but how would i make it be the thing the actor uses to collide since i doubt that just adding it would suddenly make the collision box colide with things like the character capsule
Pawn Movement Component uses the root component - do you have one? That’s it, there’s nothing else you need to do…
The player character cannot possess anything, It’s the player controller.
This may be an issue in the long run, depends on how the car is supposed to work, ofc - you will need to write the entire colliding logic from scratch.
However, in this case, you will need to enable Sweep
on that node.
if i enable sweep it will have collision, either the static mesh or the pawn?
Pawns have no collision capability of their own, they only gain it though their components like static / skeletal / spline meshes or colliders.
i enabled sweep so how do i make the static mesh component that is the car be able to use its collision
If you want to Sweep with the entire Pawn, the collider must be at the root.
how?
can you show me with images how to do that?
still the static mesh isn’t colliding
Does your low_poly_car
have collision to start with? Double click the asset in the Content Browser and:
The green wireframe is the simple collision. If it’s there, you may need to adjust collision settings but it seems that you have it set to Block All already. In which case there’s something we don’t know about your project, because sweeping collision is just this:
it’s like this
also although it propably doesn’t affect collision but i’ve given the local offset a speed variable that increases/decreases depending on whether i press a button or not
Are you showing simple collision?
Check my previous screenshot - the red arrow. This is probably 26DOP: