I am trying to make an openable drawer with a file actor inside. I have managed to make the drawer work and am able to pick up the file mesh however, I am unable to get the drop item code working correctly;
I am of the opinion that the file wont drop because its not set as the scene root, however if I were to do that the rest of the BP would stop working (drawer movement).
The reason I think this is becuase the pick up and drop functions work fine on individual actor BP’s;
I believe there is a way to get the drop function working, I just cant see it.
Perhaps there is a node or set of nodes that will allow me to focus just the file actor?
What exactly is happening here? Are you getting errors? Or is it just not dropping/simulating physics on the file actor? A little bit more detail would be helpful.
Have you set the static mesh to movable? Is it using correct collision settings? Also, maybe try setting the collision before simulating physics, not really sure about this one!
@DavidNixon Im actually using DetachFromActor node on the BP’s for items that can be picked up around the scene, doesnt seem too work when I use it in this case though.
@isikdev So the drawer is operable and the Pick Up function is working correctly so I am able to pick up the file out of the drawer.
However, the issue is that the Drop item function isnt working so the file is stuck as being equipped.
The function works on individual actor blueprints e.g I can pick up and drop a machete in my scene; I have tried incorporating that code into my drawer BP and so far, its only the drop item function that isnt working, hope this makes it a bit clearer.
You may want to use a workflow that, instead of Detaching from component, deletes the file mesh component and spawn an actor in that world transform with the same file mesh, simulated physics, and collisions settings.
Exactly what I was thinking. Not the cleanest way but I’ve done this many times on my projects and it works like a gem. A lot easier to implement as well!
Yes, indeed, and you can make the spawned actor’s mesh a variable that reads the file mesh from the drawer. So, you have a procedurally generated actor spawner. This technique is used for spawning arrows or bullet cases. Glad it helped.
I got it now. If you destroy the file component, ‘set visibility’ will return errors. So, second node is not necessary. Try connecting destroy component to spawn actor from class.
Not at all, I wonder if its a deeper problem with how the interface operates with the BP? I can see that “Event Interact With” fires off in the even graph but when I press the key for “Even Drop Component”, nothing highlights as if its not even getting to the drop component stage?