setting boundary limits to billboarding

Godot Version

v4.6.1.stable.mono.official

Question

How would i go about setting boundary limits to billboarding sprites in godot?

Im trying to create an effect that results in a sprite billboarding in 3D space but the XYZ boundries are fixed and will result in the sprite being limited in its rotation towards the camera view.

Example:

If a sprite in placed in a box and fixed to its Z direction the sprite should be placed in the box: [O]
If i move to the left side of the box the sprite will billboard towards the camera and result in it looking like this: [ I ]

The effect I want to have will result in the sprite hitting the boundary of the box and thus limiting how much of the sprite becomes visible while billboarding relative to the camera, if the X boundry was say 10 pixels in depth the camera if on the left side would not see the full image flat but instead squished [0] (this is a zero to show it as an oval and not a circle)

I would like this effect to be maintained in all XYZ directions.

To simplify I would like the sprite to billboard in a box and once it hits the billboard it cannot billboard rotationally beyond the box boundary

You can use Transform3D::looking_at()

And clamp the resulted rotation on a given axis.

What’s the use case for this?

I’m trying to create a layered sprite that will have different components represent different parts of the body to allow sprites to move in 3d space in a believable way.

Generally just want a 2.5D game that has sprites move in the z direction without a custom sprite redraw for reaching in that perspective. Will allow for better environmental interaction.

I’ve demoed the look im going for in blender and IRL (paper models). I just need this to work in godot

It’s still not entirely clear hoe exactly should the effect look/behave. Can you post that Blender mockup?

I’m not home right now so i just quickly threw this together to get my idea across.
Each sprite should not go past a designated angle for its billboarding.

This is a rough idea of what i mean

Can you make an animated mockup in Blender?