Collision on mesh attached to player not working

I have a static mesh which is attached to the player and meant to work as shield. The static mesh has a collision mesh which works when I place it in the world (and shoot projectiles on it).

However, when it is attached to the player the collision disappears. How do I properly set up collision for this mesh?
I also attempted to set it up as a skeletal mesh with a physicsbody, but this did not change anything. I have attempted most collision setups: custom, blockall, blockalldynamic.

I had the same issue but couldn’t figure it out myself either besides creating a new blueprint for the object :confused:

Hope someone gives you an answer!

Hey,

just tried the same set-up in 4.7 and it worked for me. It did collide with a physicsbody within the scene.

It did not collide with the shots fired by the player, but then I am not sure whether that is what you’re trying to achieve?

“It did not collide with the shots fired by the player, but then I am not sure whether that is what you’re trying to achieve?”
That is what I’m trying to achieve.

So you want the player’s shield to reflect the player’s bullets? Seems a bit pointless tbh :stuck_out_tongue: Could you just manually change the direction that the bullets are flying in? or do they absolutely have to reflect off the shield?

I guess if you absolute have to then you have to stick to creating the shield in a separate blueprint and attaching it to the player.

Funnily enough, I just tried it and you can place a box collision into the player blueprint and it will reflect the projectile. So I guess you could just add that onto the shield?

The problem still appears after I attach the mesh to the player. I’m guessing the object inherits some collision properties when I attach it.

How do you attach the mesh to the player?

Attach to actor using blueprint with the player as parent. I will get a screen of the exact node setup when I get home.

this is the same as my issue. When blueprint is spawned dynamically by the player there is no collision.

edit: got it working by adding a box as collision to the blueprint. i’ll use this instead

Same problem here. Anyway to make attached Actor’s collision work correctly? The only working method is to call functions like AddWorldOffset and use Sweep = true on a single Actor, but there is no equivalent thing for any attached Actor.

Hi marsonmao,

What version of the editor are you using? I just tested this in 4.9.2 and a Attached Actor has proper collision for me.

Please feel free to include some screenshots of your setup or a small test project.

Hi TJ,

I tested my console development version UE (built with 4.9.0) and normal version UE (4.9.2), they both behave incorrect with attached actor. In the following example, the Cube is BlockAllDynamic, the Pawn (The Sphere) is BlockAllDynamic, the chair is BlockAll (and Static).

Using AddWorldOffset and Sweep = true to move the cube,

And the Cube is blocked by collision,

64448-cube_has_been_blocked.png

But, if the Cube is attached to the Pawn, when moving Pawn, Cube’s collision is not working

@TJ I’m not sure if this answer helps, I leave it here for a possible reference https://answers.unrealengine.com/questions/238964/collision-when-using-attached-actors.html

Yeah, Pat-Level17 is correct. The movement component that is referenced through code isn’t designed to allow for objects other than the capsule to alter the pawns movement. It is a basic movement/collision setup that our developers do not intend to expand on at this time.

The best way to approach this would be to create a custom character/pawn that is coded to allow this functionality.

There is another ‘hacky’ way to approach this in blueprints using a sphere trace around the object. When it encounters a static object it receives a hit, it then alters the pawns movement accordingly. There would be a lot of math involved to make sure the object would slide down the wall if the player is moving towards it at an angle however. This would also be much move costly than altering the character movement code.

@TJ So is my test successful? Is the attached actor designed to behave like collision is not working? I also would like to know what does your proper collision mean? Since my proper collision is to see the attached actor being blocked; And, is your proper collision to see the attached actor to intersecting others?

@TJ I reposted my question here https://answers.unrealengine.com/questions/326577/collision-of-attached-actor-does-not-work-correctl.html , hope that can make a better discussion place, thanks.