I am writing in regards to a problem which I had for multiple days and I finally gave up as I couldnt do anything about it.
I am making a game for my phd and I got stuck at the moment where I have a shelf, and as I am overlapping it with my Main Character I am clicking F to open it ( I made so that I can open it and collect whats inside that shelf) but unfortunately those 2 static meshes overlap so that sometimes I open shelf first and sometimes I collect whats inside the shelf ( and as we know, no games should work like that, especially when you need a key to open a shelf)
Could someone assist me with this one? I would be greatful
PS. Sorry for the way I described it, I know its chaotic.
Or another question, I tried solving it with attaching mesh to the movable object but as animation went on only main mesh was moving, attached one wasnt.
Do you mean chest instead of shelf?
Can be chest also, like to get something that is inside something, for example I open chest and in the chest there is a key and then I pick the key.
The way I input trigger box around those meshes it either picks the item or open chest ( what I want to do is to first always open the chest and only then be able to pick the key)
Went thru like 10 googles pages and different forums and I just couldnt find anything, tried on my own for like 1 week alrdy and I am stuck with this, it is crucial for the project I am making and I am stuck
I seem to have it fixed ( I added new box that blocked the movement just feets away from the item I have to pick and only after I open the chest I DestroyComponent(CollisionBox) and then I am allowed to walk a bit further and pick it. I get some errors messages: Blueprint Runtime Error: “Attempted to access Box2 via property Box2, but Box2 is pending kill”. Blueprint: Shelf_movement_usable Function: Execute Ubergraph Shelf Movement Usable Graph: EventGraph Node: DestroyComponent"
But it other than just this error it seems to be working fine and have no problem with it, any idea why the error if everythings working fine?
Maybe it would be an idea to make a variable (bool) that checks if the chest is open or not.
With the key you can cast to the chest and check the variable and see if the chest is open or not. Make it that you can only pick up the key when the variable of the chest is set to ‘open’