Currently, I have a shield attached to my character’s blueprints which is a static mesh object. When I go in-game my shield goes through collidable objects. However, my character collides without any issues. Attached you can see my shield is set to blockall. I have also tried using a capsule with block all settings and putting the shield underneath and giving it block all settings among many others.
How can I make my shield collide with in-game objects?
Thank you!
This is a question with various answers, depending on who you listen to.
They’re basically along the lines of:
-
Make the player collision bigger to encompass the shield.
-
Write your own code on tick which does a trace from the shield and moves it inward if something is in the way
-
Do something fancy with a spring arm. The spring arm is used to move the player camera away from objects, and I recall seeing a nice solution like this, but can’t seem to find it at the moment…
These are all super creative ways! Not what I would necessarily want to do. However, I think doing something like the second option could be my best option. Asking for the future; would I also have to do this for all projectiles or any kind of attack from bot characters as well?
With a projectile, you’re focused on impact. The moment there is a hit, the projectile will either lodge in place, or destroy itself. You’re not worrying about it going through objects on its way to something else
Makes sense, thanks! Going to start messing around with blueprints for idea number 2 now