Simulate Physics and AttachActorToComponent problem
I'm having a problem which i cant seem to solve around spawning an inventory object into the hand of the player. Seems simple enough but I have strange behaviour with Simulate Physics preventing AttachActorToComponent from working.
The object is a blueprint subclass with only a skeletal mesh in it, set originally to Simulate Physics - i.e. so I can pick it up off the ground.
After it's picked up, I spawn a new object from the class, set Simulate Physics to OFF, and try AttachActorToComponent, but it refuses, and just hangs in the air next to the player. .!?
If the blueprint object is originally set to Simulate Physics, i.e. it hangs in the air before I pick it up, I have no problem with AttachActorToComponent, and it works as expected.
Why doesn't AttachActorToComponent work when Simulate Physics is set in runtime, not design time ? Do I have to disable collision before turning physics off? has this got something to do with the root scene component?
Banging my head now on this for too long.. appreciate any suggestions.
This is my blueprint:-
asked Jun 14 '15 at 12:38 AM in Blueprint Scripting
I have no idea why this didn't work, but I found out how to fix it. it seems the spawn node "remembers" previous inputs... and I had changed the mesh input a few times, and this must have broken it. I deleted the spawn node, and recreated it, and everything worked.....
Follow this question
Once you sign in you will be able to subscribe for any updates here