I am developing a motion tracking system using python and OpenCV. I currently have the capabilities to track markers to get their rotation and translation.
I have recently tried to use the UE remote control plugin to control objects within my scene from an external python program. I have successfully made my motion tracking technology move entire objects around, but I am now wanted to move only specific bones of an object (specifically a metahuman). For example, I may want to rotate the shoulder.
There seems to be a lack of documentation surrounding the remote control plugin, so I am struggling to finish my motion tracking system. Documentation can be found here.
My current code is:
to_send = {
"objectPath" : "/Game/" + path_level + ":PersistentLevel." + name_actor, #Path to object
"functionName" : "SetActorLocation", #Function to transform actor
"parameters" : {
"NewLocation" : {"X" : X, "Y" : Z, "Z" : Y}, #Position
"bSweep" : True
},
"generateTransaction" : True #Allow for the action to be undone
}
response = requests.put("http://" + ip + ":" + port + "/remote/object/call", json=to_send) #Send data to Unreal engine server
I really hope someone can help me. I am using UE5 and want to control the specific bone/s of a metahuman using python over LAN.
Thank you in advance, SolveItPlanet