I have a character and I’m trying to make it so that one could pick up an object with each hand. I have a physics handler right now that works fine but I can only grab one item at a time, if I hit R(right hand grab button) the object is oriented relative to the right hand, and if I hit L(left hand grab button) the object is oriented relative to the left hand. Im guessing I need to use two different physics handlers but Im confused about how to create them in c++. Here is how I create my current one.
Sorry! Youre right, I wanted to find and correctly store two existing physics handles that I had attached as components to my game character. I managed to find the solution, by creating an array of actor components and trying to cast them one by one as UPHysicsHandleComponent. If the variable existed, I stored them accordingly. Thank you for your help!
Initially yes, I created an array of components and attempted to cast them as physics handles. But I then stored them within “UPhysicsHandle” objects that I named PhysicsHandleLeft and PhysicsHandleRight. I knew which one would come first because I created the left one before the right one in the pawn blueprint in UE, and it looks like thats the order that the function detects them in. Hopefully this helped!