I am using the Fusion API to connect two cameras which I’m then streaming into an unreal engine scene. I’m using this documentation as a base : docs
When I walk from one camera to another, the mapped movement in my scene does not really match up. Essentially, my virtual character moves 1/3rd the distance of me in the real environment.
I want to get all the tracked Actors from the scene and take their predicted world position and multiply it by some vector (I’m trying to make the actors move more distance in scene compared to my actual movement).
Any tips on how to do this?
I want this as a blueprint from this pseudocode:
actorPositionInWorld = // computed by zed SDK somehow somewhere
newActorPositionInWorld = (scaled movement vector I computed) * actorPositionInWorld
actor.position = newActorPositionInWorld
What I’ve tried:
I tried inspecting the C++ file for the animation instance on each spawned actor to possibly modify the computed location of the bones from the live link data. I got a bit too confused and possibly misdirected.
I tried getting the actors computed from BPZed_Livelink_Manager and then updating their position. This seemed to have changed their spawn position, but did not update thereafter.
This is not an expected behaviour, the movement should not be scaled if you did not change the avatar’s scale.
I will take a look shortly and get back to you.
In the meanwhile, if you want to relocate the avatar, you should only have to move it’s root position, as only the rotations are used for the animation.
Also, I tried to print out the socket position of the hips of BP_ZED_Manny avatar and I got what looked like proper coordinates, but I couldn’t find a way to change where the avatar appeared in the world.
Sorry for the delay.
You probably want to do how we manage the manual height offset in the animation blueprint, that is offset the “RootPosition” by using a vector input.
Look around this line in LiveLinkOrientationRemapAsset.
ManualHeightOffset is using HeightOffset from the Animation blueprint, itself set from the livelink manager.
No worries! So, I tried to modify and build the LiveLinkOrientationRemapAsset.cpp so that I could apply my own transformation scaling, however building caused lots of errors.
I read here that if I wanted to make edits to the Live Link ZED plugin, that I would need to build from source - both the engine and Fusion API? I hope this isn’t necessary, but if I have to, then I’ll try.
…And sorry for all the confusion, I am actually quite new to unreal. Could you possibly walk me through:
You should not have to rebuild the sender, which is what requires the UE5 sources. To be clear, the sender is the only thing that requires the sources.
Add a slot for vector transformation scaling that will get applied to the root bone?
In the code, look for “HeightOffset” and mimic exactly what uses this attribute. Add your variable (which would be an FVector) to the AnimNode_ZEDLiveLinkPose.h, use it in AnimNode_ZEDLiveLinkPose.cpp just like HeightOffset.
You’ll have to create a
void SetCustomOffset(FVector CustomOffset);
in LiveLinkOrientationsRemapAsset.h and implement it in LiveLinkOrientationsRemapAsset.cpp just like SetHeightOffset(float Offset). And then use it at the same place that ManualHeightOffset is used. (You also have to create a FVector CustomOffset in LiveLinkOrientationsRemapAsset.h, next to ManualOffset).
For your packaging issue, in which configuration are you packaging? Shipping, development… ?