Download

Sceletal mesh collisions

I know this question was asked a few times here, but i didn’t find any solution yet that works for me. I created a character BP in my game. Some tipe of a hovering car.

And since it’s a character it collisions are controled by a capsule component. However my car doesn’t really fit into a capsule, and i need my sceletal mesh car physics asset to take part in collisions aswell.

I’ve tryed disabling collisions on a capsule and enabling on my mesh instead. But in that case it just ignores all collisions. In overall it’s no matter what i do capsule component is the only thing taking part in collisions.

The only way to make it work is to start simulating physics, but in that case my skeletal mesh just drops on the ground like a rag doll.

I know there’s a way to use a pawn instead, and probably i will have to do it, but isn’t there a way to make it through character BP? Using blueprints and not C++?

Or at least to scale the capsule non uniformly and rotate it?

pawn.jpg

Tags:physicscharacterbpcollisionsphysics assetretag

Ok so I found the walk around this problem. Maybe somebody will find it useful.

As i understand there’s actually no way (if you are not using C++) to make anything except the capsule component in a character BP to generate hit/overlaps events, unless you turn physics simulation on. But in that case you just loose control over your mesh.

So the way i did is I made a dummy mesh (in an overall shape of my ship) and made it physics with limit constrains to the “controlled mesh”. In my case i used only linear constrains. Then you can hide original mesh, and you will have physics object to respect the obstacles and move accordingly.

I am enabling/disabling this constrain based on a tracing result of obstacles around my character in a certain distance. If nothing is hit, constrains are just fixed to original mesh, if something is hit, I’m enabling limit constrain so the mesh can be offset instead of overlapping with obstacle.

But since constrains are enabling/disabling thing is a boolean it it makes my ship jump to a new location if a trace is triggered. Plus i don’t really wanna play with dummy mesh, I made a copy of original mesh. And used a TInterp_to function to blend my original mesh location and physics dummy location. In result i have a smooth transition from the fixed mesh and simulated mesh.

Probably not the best solution, but works for my game so far :slight_smile:solved.jpg

P.S. Would be really cool if we can see some changes in options of a Character blueprint thought :slight_smile: so we can use something else, instead of a capsule.

if you right click on your mesh in the content browser then select ‘details’ in the context menu, then in the ‘Body Setup’ you can set ‘Collision Complexity’ to ‘Use Complex Collision As Simple’ it would save you making that dummy mesh.

Yeah thanks for the tip, didn’t know it. Maybe it still makes sense to make a dummy mesh thought for optimization reasons. Not to keep a hidden duplicate of high polygon mesh in a character blueprint.

That is how it looks by the end. This is the hovercraft project based on character blueprint. At first i wanted to base it on physics pawn, and tweak all the forces affecting the car, but later i found that i love have less physics simulation but more manual control over the motion. So that is what is coming out so far. Still needs some tweaking but main motion is there.

Character is a skeletal mesh (yes it’s skinned to 3 bones :slight_smile: hovering over the ground and changing rotation based on a surface it’s hovering over. Plus it’s using body collision instead of just capsule.

https://www.youtube.com/watch?v=GrlnyT1SB-o