Hello!
The general idea of what I want to accomplish is this: I want to emulate Dead space inventory system, like so:
now, since I don’t have a real clue on how to do it, my Idea is to have a widget (inventory) floating in front of the character, so far, I managed to do that, and it seems promising (need to adjust some things like camera and so but there it is)
I don’t seem to find any quick way to avoid the widget to be ‘swallowed’ by the walls and any other static mesh, like in the next image
my solution was to encapsulate the widget inside a collision box in order to keep a distance from any mesh, this collision box is attached to the player via a spring arm with collision test enabled and a probe size big enough to avoid getting inside the walls
I’m getting almost the desired effect! however, when the player gets too close to the widget it can pass through it
I would think that the capsule component of my character would be enough to stop this from happening since it has everything set to block
and the inventory collision box is also set to block everything
but it doesn’t work as you can see on the previous test, they can intersect, I even tried to set the other box close to the character to block as well but nothing works.
My project is in C++ and I tried the following as well:
- Remove the capsule component and try to replace it with just a box collision mesh, the result was the character fell through the floor since, for some reason, didn’t want to block the floor.
- Adjust in code the collision presets to both tries I did (capsule component and box collision mesh in place of the capsule component), the result is the same as I am right now, the character doesn’t fall but the boxes attached to it don’t seem to work as intended.
currently, there’s nothing in my code that might affect this behavior as you can see in the constructor of my character
In any other place I affect the collision of the components in my character. Tried to refresh the code, reassigned the class to my character from common actor to my custom class and nothing seems to work.
I’m really confused, this is supposed to be a very simple task (or so I think), making two collision boxes block each other or having the capsule component block a collision box but nothing that I do seems to work.
If anyone can help with this I’ll be very grateful.
Thank you!