Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Method for dragging camera to make displacement in scene based on unity3D

A camera and displacement technology, which is applied in the field of dragging the camera to move in the scene, can solve the problems that the scene cannot completely follow the finger dragging and the operation is blunt, and achieve the effect of improving the simulation effect, reducing the error range and wide application range.

Active Publication Date: 2017-08-18
宝宝巴士股份有限公司
View PDF5 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In the game, it is often necessary to use operations such as dragging the mouse on the computer and sliding the finger on the mobile device to complete the scene movement and browse other areas. However, there is a distance between the camera and the scene. In the process, there are more or less errors, and it is impossible to achieve the scene to completely follow the finger dragging. If there is no smooth interpolation during the dragging process, the entire operation will be very blunt

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for dragging camera to make displacement in scene based on unity3D

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] Such as figure 1 As shown, a method of dragging the camera to move in the scene based on unity3D includes the following steps:

[0020] Step 1. Determine whether it is an orthogonal camera, if so, go to step 4, otherwise, go to step 2;

[0021] Step 2. Obtain the straight-line distance d from the camera to the center point of the field of view and the camera angle of view FOV;

[0022] Step 3. Calculate the horizontal displacement X and the vertical displacement Y according to the linear distance d and the camera viewing angle FOV: X=d×2×tan(FOV÷2), Y=X÷screen aspect ratio, wherein, The screen aspect ratio mentioned above is the screen aspect ratio that comes with the unity3D engine, skip to step 5;

[0023] Step 4. Calculate the horizontal displacement X and the vertical displacement Y according to the size of the camera: X=2×size×picture aspect ratio, Y=2×size; wherein, the picture aspect ratio is provided by the unity3D engine Screen aspect ratio, the camera size ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method for dragging a camera to make displacement in a scene based on unity3D. The method comprises the steps of judging whether the camera is an orthogonal camera; if so, calculating horizontal displacement X and vertical displacement Y according to a size of the camera, wherein X is equal to 2*size*(width-to-height ratio of frame); Y is equal to 2*size; the width-to-height ratio of the frame is a width-to-height ratio of a built-in screen of a unity3D engine; and the size of the camera is one half of visual field width of the orthogonal camera; if not, acquiring a straight line distance d from the camera to a center point of a visual field and an FOV (field of view) of the camera and calculating the horizontal displacement X and the vertical displacement Y, wherein X is equal to d*2*tan(FOV / 2) and Y is equal to X / (width-to-height ratio of frame); and finally correcting X and Y according to a rotation angle alpha of the camera to obtain corrected horizontal displacement X1 and corrected vertical displacement Y1 as target values, and making the displacement by following the target values at a certain rate in an interpolation manner to achieve a smooth movement effect. According to the method, an actual displacement effect is precisely calculated; an interpolation rate is flexible; the dragging displacement smoothness is improved; and an application scope is wide.

Description

technical field [0001] The invention relates to a method for dragging a camera to move in a scene based on unity3D. Background technique [0002] The viewing angle of the camera in the game is a cone-shaped viewing angle, which is an isosceles triangle from a cross-section. The camera is at the position of the middle vertex, and the FOV (field of view) of the camera is the inner angle of the vertex. In the game, it is often necessary to use operations such as dragging the mouse on the computer and sliding the finger on the mobile device to complete the scene movement and browse other areas. However, there is a distance between the camera and the scene. In the process, there are more or less errors, and the scene cannot be completely followed by the finger dragging. If smooth interpolation is not performed during the dragging process, the entire operation will be very blunt. Contents of the invention [0003] The technical problem to be solved by the present invention is ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): A63F13/5255H04N5/222G06T3/00
CPCA63F13/5255G06T3/00H04N5/222
Inventor 胡国柱唐光宇卢学明闫乃永王瑞珍
Owner 宝宝巴士股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products