- Home /
Can I make magnifying glass in unity3d?
I am creating an App in that one module is I providing one button if user click over button one rectangular box move as per mouse position and show the object big in size when this rectangular box come near that object.
It's entirely possible (maybe even easy!) to make that kind of feature, but it depends on what exactly your question is. What have you done already? Where are you stuck? With what code do you have a problem? Are you unsure how some component works?
Ask a more detailed question = Get a more detailed answer.
Answer by TonyLi · Aug 07, 2013 at 02:31 PM
Use a second Camera. Set the camera's viewport to the screen area of the rectangular box. You can either move the camera closer to the target or change the field of view.
To move the camera, read the mouse's axes in Update(). Then update the viewport and the camera position according to the mouse position.
I don't think there will be any issues if the OP uses the same layermask as the main camera.
$$anonymous$$agnifying glass is a circular interface.. Viewport and camera rect are rectangular.
@$$anonymous$$eer Imtiyaz Ali set this answer as true, thats it great answer
$$anonymous$$agnifying glass is a circular interface.. Viewport and camera rect are rectangular.
A non-rectangular Render Texture is the way to go if you have Pro. But I see that you're asking for a non-Pro solution; sorry, I don't have a good answer. Perhaps you could render the full rectangle, then cover the corners with a wide-framed magnifying glass GUI texture.
Your answer
Follow this Question
Related Questions
Imported Blender Models Issue 1 Answer
Rotate 180 degrees over x axis over time 1 Answer
Highlight an area of my 3D model 1 Answer
Blender to unity, importing UV mapped image textures 1 Answer
Import Model Question (.obj Sketchup) 0 Answers