Download

Handle Collision

Hello there,

Im currently working on a 2d jump and run game and run into problems.
I want to make “Collision Layers”.

Unbenannt.PNG

If you look at the Picture you can see two possible surfaces the Player can stand on (but the one hes not Standing on is Overlaping with the Player but not colliding…). which is no Problem cause those are different Objects, so i give them different collision types and Switch them in the Player on or off to enable Standing on without colliding with the other… but my Problem is now, that i want to have the same behaviour on a single sceleton mesh, like a Tree with different branches, that can overlap in this manner too.
Is there a way to specify different Collision types within the mesh or Physics actor to make this possible, and prevent a plaform that might be in this Position in the mesh from blocking the Player to stand on the lower one? (this Meshes are there to be animated.)

Thank you for your help and i hope you understand my Problem :smiley: hard to describe.

regards Hubi

Within a single mesh I think it would be hard, why not “slice” your mesh in different meshes and play with the collision then? With a single mesh I think that you could move collision boxes or disable it but it would be very messy and I do not really know if it is possible

its actually no problem if its just a static mesh, so i can just split it up, but i want to have the ability to animate it, and through the physics actor i added collision to the bones, but the problem stays the same, basically manipulating the specific collision shapes within the physics actor (to which channel they respond).

Right now the System works simply said like this:i have 4 Different Collision Types (Ground 1 Ground 2 Ground 3 Ground 4) the Ground 1 is always enabled (To secure the player from falling through the world and bottom layer). and the other grounds are for the platforms or whatever we use that the player can stand on (from level design perspective) and that could potentially overlap to have a selection of enough types. and i enable them or disable them in the player, so he just checks what type is below him and he enables that before landing. and i disable it when i want to go down.

And yes i agree with you, moving them around is really messy and could lead to more bugs and problems, so if i could disable or enable a specific collision shape within the physics actor or change its response to the player my problem would be solved… for now i can only change the whole physics actor. Or is there another way to “parent” different collisions to the bones.

I can’t check now but isn’t there a collision per bone node? if not I think Rama has a plugin for collisions per bone management.

Thank you, i did manage to find a solution, i simply attach the different collisions via Blueprint, this way i can interact with each single one :slight_smile: