No announcement yet.

SkeletalMesh Collision Problem

  • Filter
  • Time
  • Show
Clear All
new posts

    SkeletalMesh Collision Problem

    Hi, I know this problem or similar has been mentioned before on 1 or 2 threads, but they never found a solution so i'm starting a new thread in the hope that we can find one.

    The problem is, I have an actor placed in my map that uses a skeletalmesh, the mesh is too awkward a shape to use cylinder collision, so instead I disable that by setting bUseCylinderCollision=false. When I play the map the mesh has no collision, everything can pass straight through and the bump and touch functions are not triggered.

    In the collision tab I have everything set to true. Shouldn't the mesh now use it's own shape as the collision? Like a staticmesh does? This doesn't seem to be the case, so in the meshes properties I added some collision boxes and spheres, to accurately build collision for the mesh I would need probably a hundred of these. I created just a few to test them out. I set the collision in all 3 collision propeties (bBlockNonZero etc...) to 1. In game everything still passes straight through these collision boxes and spheres. I used Show Collision to verify that the collision is there.

    So next I decided to create a simpler mesh to use as the collision, in the mesh properties I set the collision staticmesh and turned on bUseStaticMeshCollision in the actor itself. In game everything still passes straight through the actor.

    A while a go I altered a monster to use collision boxes and spheres instead and all I had to do was set bUseCylinderCollision to false. And it worked just as expected. I've tried making my actor subclass Actor, Decoration, xPawn but each time it doesn't work. I tried using a small skeletalmesh and I get the same problem.

    My next idea is to use an invisible staticmesh of the model to fake the collision, but i'm sure I should'nt have to do this, what's worse is my sketalmesh obviously plays animation and the moving parts will not always be covered by the staticmesh.

    Has anyone else ran into this problem? Does anyone know of or can think of a solution or possible things to try?

    Thank you for any help.

    I've been experimenting and can get the collision boxes and spheres to work only if I extend Monster and it has a Controller and the chain to PostBeginPlay in Pawn is not broken. :s The bad thing is the log is full of errors, squad, anim, bone, deathmatch errors etc... and the monster roams around etc...

    I still can't get the bUseCollisionStaticMesh to work.


      Have you just tried importing and essentialy doing nothing to it? Sounds like you did, but hard to tell. Honestly I have no freaking clue. Waht application are ya using for export etc. maybe it's just a glitch in that or something.


        The 'bUseCollisionStaticMesh' variable is a little decieving. When set to true, it does not mean that the actor will use its own static mesh for collision, but rather it will collide with the static mesh of other objects (actually just the CollisionStaticMeshes assigned to a given skeletal mesh in the Animation Browser if I recall correctly). An example of this is the BioGlob which has buseCollisionStaticMesh set to true so that it will stick to vehicles in a more realistic way using the vehicle's skeletal mesh collisionstaticmesh.

        [EDIT] Have you tried changing the values of bBlockKarma, bCollideActors, and bBlockActors to true, and then disabling bCollideWorld (just like the ASTurret_IonCannon). I've only ever seen subclasses of pawn be able to use the collision boxes attached to their skeletal meshes, maybe its just some native collision code that is pawn specific. I'd definitely be interested in seeing what you come up with.

        The only other 'kludge' possible solution that comes to mind would be to spawn invisible dummy actors using static meshes for their collision and attaching them to sockets of the skeletal mesh base actor.


          A SkeletalMesh never has per-poly collision. A SkeletalMesh actor either has cylinder collision, uses a separate StaticMesh as collision shape or you can define collision boxes and spheres to attach to the various bones of the SkeletalMesh. Vehicles use this, if you need an example.

          The bone collision must be specified in the mesh itself, so if you want to add collision to an existing mesh, you first need to duplicate it (rename to a new package, but without saving the old one). I had to do that to add collision and new notifies to the spider mine mesh:


            Thanks but I already knew that Wormbo, and tried it all. The problem is that it only seems to work for Pawns and then only under certain conditions. I've used collision boxes and spheres with monsters before.

            Thanks for the clarification Meowcat about the staticmesh collision. I tried the suggestions you made but had no luck.

            So far i've decided to just fake it using hidden staticmeshes. My mesh is an organic object and it has moving parts which bend and twist, but the actor itself never moves. I've used a simplified staticmesh for the main bulk of the shape but for the moving parts i'm using a custom staticmesh actor which mainly just has bStatic=False and some custom code which allows the mapper (me) to specify which actor is it's owner and which socket to attach to. (i'm doing it this way because all of the skeletalmeshes, staticmeshes etc.. all exist in mylevel and rather than making the Mesh actor spawn all of the staticmesh actors, to avoid collision issues whilst spawning, more than anything). The other option was to create a new monster and strip all of the pawn and controller code to bare minimum, and in my case I would still have to use an invisible staticmesh for the main bulk of the mesh so it makes sense to just create a dozen sockets instead.