we’re trying to use a ZED 2i in vertical orientation in UE: We’re building a smart mirror application and would like to attach the cam vertically on one side of a screen (that is also in vertical orientation).
For now, we couldn’t figure out a way to rotate the image or a virtual camera in UE. We also couldn’t recalibrate the cam, since there’s no blue circle showing up in the calibration tool.
What we tried so far in UE:
manipuliating the BP_ZED_Initializer obj by changing the Tracking Parameters → Rotation & disabling “set Floor as Origin”
What we tried outside of UE:
setting up a room in the “ZED” application → but this requires 2+ cameras
manually editing the calibration file to simulate a 90° rotation → didn’t work
When using the “ZEDfu” application or the “ZED Depth viewer” we can see that the IMU in the cam works fine to understand that the cam is in a vertical position: Is there a way to use this in UE?
I just tested the default settings of the BP_ZED_Initializer, and it should work out-of-the-box with vertical cameras in Body Tracking levels.
The most important setting is Set Gravity as Origin, which makes the camera use the IMU to position itself and align its world reference frame with gravity.
This will ensure the avatars are spawned with the correct orientation.
For the camera image preview, it’s true we don’t have anything in place to adjust the rotation.
I did a quick prototype to show you where to look to do it on your side.
Look for BP_VirtualCanvas and edit the Event graph like this:
ZEDColor is the ZED Image, the roll of the camera actor is the roll of the camera which is what you need in my understanding, and you set the angle of the image as it’s shown.
Rather than doing it like, I would probably put thresholds in place and only do it once at the start if the camera is static, but this is all you should need.
Side note, I recommend using a BP_VirtualCamera to set the point of view of your level, it will prevent the virtual view from being aligned with the ZED orientation, which can be useful.
Side note bis, you should not have to recalibrate your camera if you don’t encounter calibration issues (bad depth can be one for instance).
Can you explain the problem a bit more?
I have trouble understanding what the result you want is, and what result you currently have (and why it’s not satisfactory).
Ideally, if you can include a video recording of your screen or screenshots, or a drawing explaining the problem, that would probably help clarify it for me.
Hi @JPlou, I just figured out that the problem is somewhere else: When starting the game I see through the ZED cam actor although I used this approach to use a static main camera:
This means not only the tracked body but also the floor is 90 deg rotated. But the tracking relatively to the world is absolutely fine and as you said, it’s working with default settings.
So now I’ll have to search for a sufficient way to use another cam actor instead of the zed cam actor, but that should be possible. Thank you!
[EDIT: as I just saw the “ZED/Blueprints/Utilities/BP_Virtual Camera Blueprint Class” is doing the job just fine and everything works smoothly]