How rotate camera on one touch (in Unity3d, with camera Perspective) - unity3d

I making viewer big model in Unity3d for mobile.
How rotate camera on one touch around self

Here is doc about TouchInput Unity Doc. E.g You can count screen width and hight to angle and rotate camera object. Or You can use one of assets from Asset Store e.g : Simple Touch Camera Script

Related

How to pause/freeze the AR Camera in Unity?

I am making an AR game with Unity.
I used the commonly used 'Time.timeScale = 1' to use the pause function,
This will turn the AR Camera screen into a black screen.
In addition, if you add the ar occlusion manager function in this state, the app will be down with the screen bugged.
When using AR Camera, what is the proper way to implement temporary suspension?
The actual screen you are viewing with AR camera should be seen with a frozen frame.
Please
What i would do is take a camera shot
ScreenCapture.CaptureScreenshot("TestImage.png");
then i would display it on a raw image
RawImage qrRenderer;
renderer.material.mainTexture = webcamTexture;
you can at that time disable youe camera
camera.enabled = false;

How can I turn off camera video background in Unity ARKit

I'm trying to build a "lights-off" feature in my ARKit app, where I basically turn off the camera video background and only show my 3D content, sort of like VR.
Could someone please help me figure out how to turn off the the video background. I can see that a material called YuVMaterial is being used to render the camera texture but setting that to single color actually covers the entire screen and doesn't show my 3D content either.
You can uncheck the UnityEngine.XR.ARFoundation.ARCameraBackground component under the main AR camera, it will just render a black background.
In Unity, you can switch between cameras while using ARKit. The main camera has a run time spherical video applied to it, so it's not actually your device camera, but a rendering of what the device camera sees. By switching cameras, you can effectively "turn off" the background video image, but still take advantage of the ARKit properties. Have fun.

Unity 5 widen view instead of resize

I would like to keep my game the same size on any screen. I don't want it to resize though. I would a player to see more of a game field. All game assets should be fixed size, instead player should see more map. How to do this in Unity 5?
Move the camera backwards, increase the orthographics size of the camera, or increase the FOV, then scale the assets up as a function of distance from the camera.

Unity3D - Embedding a 3d scene in a 2d scene

I'm fairly new to Unity and I'm trying to embed a 3d view inside a 2d one.
I'm working on an emulation app that has a 2d UI for controls and a preview of the result in a 3d box that should be embedded in the 2d one, sort of as a player.
What's the right approach to doing that in Unity? Is there a way of "embedding" one scene in another?
Thanks!
If you want to create 3D effect with UI canvas, you should look to this link.
If you are using 2D project, it is basically 3D scene with camera set to use ortographic projection, not perspective. So you can use 3D models as well.
You should look into Render Texture. Those allows to render a camera view onto a texture in a scene. Say you have a part of a scene an dyou want to render onto a TV screen in your game. You would place the TV scene somewhere and place your camera to view it. Then you create a render texture and apply onto the mesh that is making your tv screen.
Now if you wish to make a UI system, like a radar with a top view, you would modify the viewport of your top view camera (0,0,.2,.2 would place it bottom left corner with 20% height and width) and make the depth higher so that it renders on top of the main camera.

Vuforia how to place persistent models in the world

I am using Vuforia and Unity to do AR. So far I have gone through the ImageTarget example, and am able to see the teapot using my Samsung Galaxy S4. I've also managed to overlay some UI elements on the screen.
Now, I'm trying to place a persistent 3d object (capsule for example) in the world.
However, when I place a capsule say, next to the teapot, I see only a white screen when I start the android app.
Why is this so? How can I resolve this?
My scene hierachy is like this
ARCamera
Directional Light
ImageTargetChips
ImageTargetStones
Canvas <-- for UI overlay
EventSystem
Capsule <-- adding this into the world causes screen to turn white
Even if I shift Capsule to under ARCamera, I only see white when I start up the app.
Thanks.
You have to learn about the Unity hierarchy. Everything, i.e., 3D objects, image, audio, etc., i.e content associated to specific image target must be Hierarchically child of ImageTarget.
Here, you need to put your 3DObject (Capsule) inside the image target (Stones/Chips).
Like
> +ARCamera
>
> -ImageTargetChips
>
> Teapot
> Capsule
And then adjust the position & Scale of capsule (3D Object)
Your 3D object must be in a camera view:
eg. Position of camera: x:0 y:0 z:0
Position of image target: x:0 y:0 z:-60
Here, Z axis is "Depth"