How to move and rotate physics constraints with blueprint
As much as I would like to put this under the blueprint section I think I am suffering from a lack of knowledge about the engine this is why I chose that section to post in.
Here is my question, how can we move a series of objects linked by a series of physics constraint without breaking anything.
Here is my first issue that I had and tried to overcome alone - I have 2 of the same series of objects attached with physics constraint. I wish to modify their position and angle independently then have one copy the other position and angle (for each objects in them)
(my attempts at solving this issue) - Several hours of research on google to find little to none documentation about this feature. - For my first issue I tried to forloop through each object of the chain1 to copy positions of chain2 then do the same for rotation but it did not work. - I then tried a forloop doing position and rotation for each object instead of covering the array twice but the same thing happened (the character kinda explodes in the sky). - I tough about spawning an object instead to replicate the chain2 while deleting the original chain1 but that is clearly not a good idea as I have variables to keep track of in the chain1 that are different from the chain2 as well as different components
This is the second issue - The second issue I have is that if I use before making the move and rotation then reattach the constraint to the same objects I get a bug as there will be an offset in the limit angles if there is any offset with the original angle on each joints when it spawned, which makes sense as the constraint once broken and reattached probably reset the angle value to 0.
In other words I think there are 3 options available: - I either need to be able to prevent the series of constraint from exploding after rotating and moving them (does not seem possible in unreal, if it is please let me know) - Or I need to be detaching the constraint, moving and rotating everything, reattaching the constraint and apply an offset previously calculated to fix the bug(how would I calculate this offset please help?) - Or I access the angle variable that was used by the physics constraint script before detaching it and once reattached I would overwrite the default 0degrees for that values BUT clearly that wont happen. Any suggestions?
I would hate to give up on this as the only other option remaining for me is to start from scratch with a model that has bones and figure out a way to do the exact same as physics constraints (without the issues of course). I already had to give up on that project when working in unity for weeks before switching to unreal.
asked Nov 19 '18 at 09:21 PM in Using UE4
Follow this question
Once you sign in you will be able to subscribe for any updates here