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.
“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 Could you just manually change the direction that the bullets are flying in? or do they absolutely have to reflect off the shield?
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?
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.
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,
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?