Hello, I’m trying to recreate the “Examine” feature in Resident Evil Remake.
Currently, I have the rotation right, what’s left is how to setup a background, and handle the camera(s) responsible for that. (By background I mean the image behind the object)
FYI I’m using NGUI. I have no problem setting up a background, with a separate camera showing only that background and the object to examine. But the problem lies when I try to Zoom in/out. What I wanna do, is I want to zoom in/out to the object, without it getting out of the background!
1- If I parent both the background and the 3d object to some empty gameobject, and try to zoom in that way (tried both orthogonal and perspective cams), both the 3d object and the background will get affected and enlarged (zoomed in/out to/from), I don’t want that, I just want the weapon/3d object to get affected, I want the background to stay still, so…
2- If I try to separate the background from the weapon, so that when I zoom in/out I only affect the weapon, what happens is that if I zoom in too much, the weapon/object will get out of the bounds/area of the background, like so:
(In this image, the background is being rendered by another camera, and the weapon by another, both cams are ortho, and I’m zooming in by changing the size of the viewport)
I hope my problem is clear. So my question is, how can I zoom in/out to the weapon, in a way that it will always be (rendered?) inside the background?
Thanks for the help.
EDIT: This is exactly what I’m trying to achieve, notice in the left image how a small portion of the right side of the shotgun isn’t showing up, same thing in the right image, the top side of the shotgun… they don’t show up, as if they’re cut.