WO2024251109A1 - 视角切换方法、装置、计算机设备及计算机可读存储介质 - Google Patents

视角切换方法、装置、计算机设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2024251109A1
WO2024251109A1 PCT/CN2024/097262 CN2024097262W WO2024251109A1 WO 2024251109 A1 WO2024251109 A1 WO 2024251109A1 CN 2024097262 W CN2024097262 W CN 2024097262W WO 2024251109 A1 WO2024251109 A1 WO 2024251109A1
Authority
WO
WIPO (PCT)
Prior art keywords
control
movement
camera
perspective
virtual camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2024/097262
Other languages
English (en)
French (fr)
Inventor
谢宇飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Publication of WO2024251109A1 publication Critical patent/WO2024251109A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • A63F13/525Changing parameters of virtual cameras
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/6045Methods for processing data by generating or executing the game program for mapping control signals received from the input arrangement into game commands
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images
    • A63F2300/6661Methods for processing data by generating or executing the game program for rendering three dimensional images for changing the position of the virtual camera

Definitions

  • the present application relates to the field of computer technology, and in particular to a perspective switching method, device, computer equipment and computer-readable storage medium.
  • the game character when the user controls a game character, the game character is manipulated to present different perspectives, such as controlling the game character to move in different directions such as up, down, left, right, front, and back, or controlling the game character to rotate, so that the game screen presents different perspectives.
  • the perspective of the game character is controlled by setting multiple controls in the game screen, each control realizing a corresponding function, thereby controlling the game screen to present different perspectives.
  • the embodiments of the present application provide a method, device, computer equipment and computer-readable storage medium for switching viewing angles.
  • the method for switching viewing angles can realize viewing angle control in multiple modes through a viewing angle control.
  • an embodiment of the present application provides a perspective switching method, wherein a graphical user interface is provided by a computer device, the graphical user interface includes a picture obtained by real-time shooting of a virtual scene by a virtual camera, and a perspective control displayed on the picture, and the perspective control is configured to have at least two control modes, and the method includes:
  • a first movement parameter of the virtual camera on the vertical plane is obtained according to the first movement operation, and the virtual camera is controlled to move in the vertical plane according to the first movement parameter;
  • a second movement parameter of the virtual camera in the depth direction of the virtual scene is obtained according to the second movement operation, and the virtual camera is controlled to move in the depth direction of the virtual scene according to the second movement parameter.
  • an embodiment of the present application provides a perspective switching device, wherein a graphical user interface is provided by a computer device, the graphical user interface includes a picture obtained by real-time shooting of a virtual scene by a virtual camera, and a perspective control displayed on the picture, the perspective control is configured to have at least two control modes, and the device includes:
  • a first control module is configured to execute, when the perspective control is in a first control mode, in response to a first movement operation in a default area of the perspective control, obtain a first movement parameter of the virtual camera on the vertical plane according to the first movement operation, and control the movement of the virtual camera on the vertical plane according to the first movement parameter;
  • a mode switching module is configured to execute a state switching operation on the viewing angle control to switch the viewing angle control to a second control mode
  • the second control module is configured to execute, when the perspective control is in a second control mode, in response to a second movement operation in a default area of the perspective control, obtain a second movement parameter of the virtual camera in the depth direction of the virtual scene according to the second movement operation, and control the virtual camera to move in the depth direction of the virtual scene according to the second movement parameter.
  • an embodiment of the present application provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the perspective switching method provided in the embodiment of the present application.
  • an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the perspective switching method provided in the embodiment of the present application is implemented when the processor executes the program.
  • the perspective control when the perspective control is in the first control mode, in response to the first movement operation in the default area of the perspective control, the first movement parameter of the virtual camera on the vertical plane is obtained according to the first movement operation, and the virtual camera is controlled to move in the vertical plane according to the first movement parameter; in response to the state switching operation of the perspective control, the perspective control is switched to the second control mode; when the perspective control is in the second control mode, in response to the second movement operation in the default area of the perspective control, the second movement parameter of the virtual camera in the depth direction of the virtual scene is obtained according to the second movement operation, and the virtual camera is controlled to move in the depth direction of the virtual scene according to the second movement parameter.
  • different control modes can be realized through one perspective control, thereby presenting pictures of different perspectives of the virtual scene, and improving the efficiency of perspective control.
  • FIG. 1 is a flow chart of a perspective switching method provided by one of the optional embodiments of the present application.
  • FIG. 2 is a flow chart of a perspective switching method provided by one of the optional embodiments of the present application.
  • FIG3 is a flow chart of a perspective switching method provided by one of the optional embodiments of the present application.
  • FIG. 4 is a schematic diagram of a viewing angle control provided by one of the optional embodiments of the present application.
  • FIG. 5 is a schematic diagram of a virtual camera provided by one of the optional embodiments of the present application.
  • FIG. 6 is a schematic diagram of a virtual camera provided by one of the optional embodiments of the present application.
  • FIG. 7 is a schematic diagram of a viewing angle control provided by one of the optional embodiments of the present application.
  • FIG. 8 is a schematic diagram of a virtual camera provided by one of the optional embodiments of the present application.
  • FIG. 9 is a schematic diagram of a viewing angle control provided by one of the optional embodiments of the present application.
  • FIG. 10 is a schematic diagram of a virtual camera provided by one of the optional embodiments of the present application.
  • FIG. 11 is a schematic diagram of the structure of a viewing angle switching device provided in one of the optional embodiments of the present application.
  • FIG. 12 is a schematic diagram of the structure of a computer device provided in one of the optional embodiments of the present application.
  • the game character when the user controls a game character, the game character is manipulated to present different perspectives, such as controlling the game character to move in different directions such as up, down, left, right, front, and back, or controlling the game character to rotate, so that the game screen presents different perspectives.
  • the perspective of a game character is controlled by setting a plurality of controls in the game screen, each of which implements a corresponding function, thereby controlling the game screen to present different perspectives.
  • the embodiments of the present application provide a perspective switching method, device, computer equipment and computer readable storage medium.
  • the perspective switching method can realize multiple modes of perspective control through a perspective control unit.
  • the perspective switching method provided in this application can be applied to computer devices such as mobile phones and computers.
  • the computer device provides a graphical user interface, and the graphical user interface can display a virtual scene and a perspective control in the virtual scene.
  • the virtual scene can be a game scene
  • the perspective control can be a control corresponding to a game character in the game scene. Piece.
  • FIG1 is a flow chart of a method for switching viewing angles provided in an optional embodiment of the present application.
  • the method for switching viewing angles may include the following steps:
  • a first movement parameter of the virtual camera on the vertical plane is obtained according to the first movement operation, and the virtual camera is controlled to move in the vertical plane according to the first movement parameter.
  • the perspective control corresponds to multiple control modes, and the icons of the perspective control in each control mode are different.
  • the default control mode of the perspective control is the first control mode.
  • the control mode of the perspective control is the first control mode
  • the computer device can capture the first movement parameter of the perspective control.
  • the control mode of the perspective control is the first control mode
  • the user can control the perspective control by clicking, dragging, sliding, etc., so as to perform a first movement operation in the default area of the perspective control.
  • the default area of the perspective control can be understood as an icon area. For example, if the icon of the perspective control is circular, the default area is the circular icon area of the perspective control.
  • the touch point for the viewing angle control operation is within the default area corresponding to the viewing angle control.
  • the viewing angle control is a circular icon
  • the radius of the circular icon is R
  • the preset range can be a circular range with the center of the circular icon as the center and a radius of 3R. It can be set specifically according to the actual viewing angle operation requirements. This is only an example and does not limit this application.
  • the computer device can capture the user's touch point, and then determine the first movement operation according to the moving distance and moving direction of the touch point.
  • the control logic corresponding to the perspective control is the first control logic of the first control mode, that is, when the user operates the perspective control, the perspective is controlled according to the first control logic.
  • the icon corresponding to the perspective control is a first display icon, and the first display icon helps the user understand the control mode currently corresponding to the perspective control.
  • the viewing angle control when the user manipulates the viewing angle control, the viewing angle control has a corresponding touch point, which may be a touch point generated by the user touching the touch display screen with a finger, or a touch point generated on the screen by the user using an external device such as a mouse.
  • the computer device may determine the first movement operation according to the touch point.
  • the computer device can obtain the first operation moving distance and the first operation moving direction of the first moving operation; determine the first camera moving direction and the first camera moving distance of the virtual camera in the vertical plane based on the first operation moving distance and the first operation moving direction, wherein the first moving parameters include the first camera moving distance and the first camera moving direction.
  • the computer device can determine a first camera movement distance of a corresponding proportion of the virtual camera in the virtual scene based on the first movement distance; determine the first movement direction as the first camera movement direction of the virtual camera in the virtual scene; and control the virtual camera to move in the vertical plane according to the first camera movement distance and the first camera movement direction, so that the virtual camera captures a first picture.
  • the virtual camera moves in a vertical plane, for example, the virtual camera faces the object to be photographed, and the virtual camera moves up, down, left, and right in the vertical plane.
  • the moving direction of the virtual camera is perpendicular to the shooting direction of the virtual camera.
  • the computer device can establish a plane coordinate system corresponding to the movement of the virtual camera, and then set the moving distance and moving direction in the plane coordinate system, so as to obtain the vector corresponding to the moving distance and moving direction. Then obtain the component vector corresponding to the vector on the coordinate axis, and then determine the component vector whose direction is perpendicular to the shooting direction of the virtual camera as the target component vector, and then determine the direction of the target component vector as the first camera moving direction corresponding to the virtual camera, and then multiply the modulus of the target component vector by the corresponding ratio to obtain the first camera moving distance corresponding to the virtual camera.
  • the computer device may move the virtual camera according to the first camera movement distance and the first camera movement direction, so that the virtual camera moves in a certain direction.
  • the object is photographed at different positions, so that the corresponding picture of the virtual scene is presented in the graphical user interface.
  • the computer device may switch the first control mode of the perspective control to the second control mode in response to at least two press operations on the perspective control within a preset time period.
  • the triggering condition for triggering the second control mode of the perspective control is determined, and the user can control the perspective control through the second control mode to switch the shooting perspective of the virtual scene in the virtual scene.
  • the triggering operation may also be other operations such as clicking and pressing.
  • the first display icon of the first control mode of the perspective control is switched to the second display icon of the second control mode; and the first control logic of the first control mode of the perspective control is switched to the second control logic of the second control mode.
  • the user is reminded that the control mode of the perspective control has entered the second control mode by switching the icon corresponding to the perspective control.
  • the second control logic is different from the first control logic, and the control method corresponding to the perspective control element also changes.
  • the computer device can obtain the user's touch operation on the viewing angle control. For example, the user performs the second movement operation by sliding or dragging in the control area of the viewing angle control, and the computer thereby captures the second movement parameter.
  • a second movement parameter of the virtual camera in the depth direction of the virtual scene is obtained according to the second movement operation, and the virtual camera is controlled to move in the depth direction of the virtual scene according to the second movement parameter.
  • the computer device may determine the first touch point of the second movement operation currently in the default area; determine the second operation movement distance between the first touch point and the first reference point in the default area of the perspective control, and the second operation movement direction from the first reference point to the first touch point; and determine the second movement parameter of the virtual camera in the depth direction of the virtual scene according to the second operation movement distance and the second operation movement direction.
  • the second movement parameter includes the second camera movement direction and the second camera movement distance.
  • the computer device may determine the second camera movement distance of the virtual camera in the depth direction of the virtual scene according to the second operation movement distance.
  • the second camera movement distance corresponding to the second operation movement distance may be calculated according to a preset proportional relationship.
  • the computer device can map the second operation moving direction to the second camera moving direction in the depth of field direction of the virtual scene of the virtual camera according to a preset mapping relationship between the second operation moving direction and the forward and backward moving direction of the camera, wherein if the second camera moving direction is opposite to the shooting direction of the virtual camera, the virtual camera moves backward according to the second camera moving distance; if the second camera moving direction is the same as the shooting direction of the virtual camera, the virtual camera moves forward according to the second camera moving distance.
  • the corresponding movement direction of the virtual camera is moving toward the photographed object in the depth of field direction.
  • the second operation movement direction is sliding downward, the corresponding movement direction of the virtual camera is moving away from the photographed object in the depth of field direction.
  • the virtual camera is controlled by the second camera moving distance and the second camera moving direction, so as to control the distance between the virtual camera and the photographed object.
  • the proportion of the subject in the second picture in the second picture is larger than the proportion of the subject in the original picture in the original picture. If the focal length of the virtual camera is reduced, the proportion of the subject in the second picture in the second picture is smaller than the proportion of the subject in the original picture in the original picture.
  • the perspective control can be operated to control the virtual camera to change the distance between the virtual camera and the photographed object, thereby changing the focal length, so that the virtual camera can capture the image corresponding to the photographed object in the virtual scene.
  • a viewing angle control is set to give different control modes, so that in different control modes, the user can adjust the shooting angle of the virtual camera through the viewing angle control, thereby obtaining The images in the virtual scene from different perspectives improve the efficiency of perspective switching.
  • the process of controlling the perspective control may be in a game editing process or a game editing scene, such as shooting a certain screen in the game, which can be used to shoot the game scene.
  • a game editing scene such as shooting a certain screen in the game
  • it can also be used to control the perspective of the game character in the game scene, and it can also be applied to the perspective control of the game scene alone, which is not limited here.
  • the perspective control when the perspective control is in the first control mode, in response to the first movement operation in the default area of the perspective control, the first movement parameter of the virtual camera on the vertical plane is obtained according to the first movement operation, and the virtual camera is controlled to move in the vertical plane according to the first movement parameter; in response to the state switching operation of the perspective control, the perspective control is switched to the second control mode; when the perspective control is in the second control mode, in response to the second movement operation in the default area of the perspective control, the second movement parameter of the virtual camera in the depth direction of the virtual scene is obtained according to the second movement operation, and the virtual camera is controlled to move in the depth direction of the virtual scene according to the second movement parameter.
  • different control modes can be realized through one perspective control, thereby presenting pictures of different perspectives of the virtual scene, and improving the efficiency of perspective control.
  • FIG. 2 is a flowchart of a perspective switching method provided in another optional embodiment of the present application.
  • the perspective switching method may include the following steps:
  • a first operation movement distance and a first operation movement direction of the first movement operation are obtained.
  • the perspective control corresponds to multiple control modes, and the icons of the perspective control in each control mode are different.
  • the default control mode of the perspective control is the first control mode.
  • the control mode of the perspective control is the first control mode
  • the computer device can capture the first movement parameter of the perspective control.
  • the control mode of the perspective control is the first control mode
  • the user can control the perspective control by clicking, dragging, sliding, etc., so as to perform a first movement operation in the default area of the perspective control.
  • the default area of the perspective control can be understood as an icon area. For example, if the icon of the perspective control is circular, the default area is the circular icon area of the perspective control.
  • the control logic corresponding to the perspective control is the first control logic of the first control mode, that is, when the user operates the perspective control, the perspective is controlled according to the first control logic.
  • the icon corresponding to the perspective control is a first display icon, and the first display icon helps the user understand the control mode currently corresponding to the perspective control.
  • FIG. 4 is a schematic diagram of a viewing angle control provided in an optional embodiment of the present application.
  • the display icon of the viewing angle control is the first display icon.
  • the viewing angle control When the user manipulates the viewing angle control, the viewing angle control has a corresponding touch point, which may be a touch point generated by the user touching the touch display screen with a finger, or a touch point generated on the screen by the user using an external device such as a mouse.
  • the first movement parameter is obtained through the first movement operation, and the first movement operation includes the first operation movement distance and the first operation movement direction of the touch point corresponding to the perspective control.
  • the control mode of the perspective control is the first control mode
  • the initial touch point and the final touch point of the user operating the perspective control can be obtained, and then from the initial touch point to the final touch point, the first operation movement distance and the first operation movement direction of the touch point are obtained.
  • the touch point for the viewing angle control operation is within the preset range corresponding to the viewing angle control, and the preset range is the default area corresponding to the viewing angle control.
  • the preset range can be a circular range with the center of the circular icon as the center and the radius range as R.
  • the specific setting can be based on the actual viewing angle operation requirements.
  • the circular icon The range is the preset range. This is only an example and does not limit this application.
  • the first operation moving direction is the positive direction of the Y-axis
  • the first operation moving distance is the Y-axis coordinate value of the final touch point minus the Y-axis coordinate value of the initial touch point.
  • the first operation movement direction is the positive direction of the X-axis
  • the first operation movement distance is the X-axis coordinate value of the final touch point minus the X-axis coordinate value of the initial touch point.
  • the computer device can obtain the first operation moving distance and the first operation moving direction of the first moving operation; determine the first camera moving direction and the first camera moving distance of the virtual camera in the vertical plane based on the first operation moving distance and the first operation moving direction, wherein the first moving parameters include the first camera moving distance and the first camera moving direction.
  • the computer device can determine a first camera movement distance of a corresponding proportion of the virtual camera in the virtual scene based on the first movement distance; determine the first movement direction as the first camera movement direction of the virtual camera in the virtual scene; and control the virtual camera to move in the vertical plane according to the first camera movement distance and the first camera movement direction, so that the virtual camera captures a first picture.
  • the virtual camera moves in a vertical plane, for example, the virtual camera faces the object to be photographed, and the virtual camera moves up, down, left, and right in the vertical plane.
  • the moving direction of the virtual camera is perpendicular to the shooting direction of the virtual camera.
  • the computer device can establish a plane coordinate system corresponding to the movement of the virtual camera, and then set the moving distance and moving direction in the plane coordinate system, so as to obtain the vector corresponding to the moving distance and moving direction. Then obtain the component vector corresponding to the vector on the coordinate axis, and then determine the component vector whose direction is perpendicular to the shooting direction of the virtual camera as the target component vector, and then determine the direction of the target component vector as the first camera moving direction corresponding to the virtual camera, and then multiply the modulus of the target component vector by the corresponding ratio to obtain the first camera moving distance corresponding to the virtual camera.
  • the computer device can move the virtual camera according to the first camera movement distance and the first camera movement direction, so that the virtual camera shoots the object at different positions, thereby presenting a picture corresponding to the virtual scene in the graphical user interface.
  • the movement of the virtual camera can be controlled according to the first camera movement distance and the first camera movement direction in the vertical plane to which the virtual camera belongs.
  • the virtual camera thus captures the training scene to obtain a first picture, and the computer device displays the first picture through a graphical user interface.
  • the first picture is merely translated relative to the original picture, that is, if a photographed object is on the left side of the original picture, then after the virtual camera is translated, the photographed object in the first picture is on the right side.
  • Figure 5 is a schematic diagram of a virtual camera provided by an optional embodiment of the present application.
  • Figure 6 is a schematic diagram of a virtual camera provided by another optional embodiment of the present application.
  • the virtual camera perpendicular to the X-axis is controlled to move left and right.
  • the virtual camera perpendicular to the Y-axis is controlled to move up and down.
  • the virtual camera in the first control mode, can be controlled to move along a plane perpendicular to the shooting direction, thereby achieving the switching of the viewing angle.
  • the viewing angle control In response to a state switching operation on the viewing angle control, the viewing angle control is switched to a second control mode.
  • the computer device may respond to at least two presses of the viewing angle control within a preset time period. If the following operation is performed, the first control mode of the viewing angle control is switched to the second control mode.
  • the triggering condition for triggering the second control mode of the perspective control is determined, and the user can control the perspective control through the second control mode to switch the shooting perspective of the virtual scene in the virtual scene.
  • the triggering operation may also be other operations such as clicking and pressing.
  • the first display icon of the first control mode of the perspective control is switched to the second display icon of the second control mode; and the first control logic of the first control mode of the perspective control is switched to the second control logic of the second control mode.
  • the user is reminded that the control mode of the perspective control has entered the second control mode by switching the icon corresponding to the perspective control.
  • the triggering condition of the second control mode can also be triggered in other ways, for example, when the pressing pressure value is greater than a preset pressure value, the triggering condition of the second control mode is triggered. When the pressing area is greater than a preset pressing area, the triggering condition of the second control mode is triggered. This is not limited here.
  • the second control logic is different from the first control logic, and the control method corresponding to the perspective control element also changes.
  • the computer device can obtain the user's touch operation on the viewing angle control. For example, the user performs the second movement operation by sliding or dragging in the control area of the viewing angle control, and the computer thereby captures the second movement parameter.
  • the viewing angle control in response to a second movement operation in a default area of the viewing angle control, determine a first touch point of the second movement operation currently in the default area.
  • a first touch point of a user in a default area of a viewing angle control is acquired in the second control mode.
  • the first touch point may be a current latest touch point in the default area of the viewing angle control.
  • FIG. 7 is a schematic diagram of a viewing angle control provided in another optional embodiment of the present application.
  • a first reference point is set in the default area, and the first reference point may be a preset position point of the default area, such as the center point of the second display icon.
  • the first reference point may be an initial touch point of the second movement operation in the default area.
  • the first touch point may be a final touch point in the default area.
  • the first touch point may also be a current touch point in the default area.
  • the computer device can determine a second operation movement distance between the first touch point and a first reference point in a default area of the viewing angle control, and a second operation movement direction from the first reference point to the first touch point.
  • the computer device may determine the second camera movement distance of the virtual camera in the depth direction of the virtual scene according to the second operation movement distance. For example, the second camera movement distance corresponding to the second operation movement distance may be calculated according to a preset proportional relationship.
  • the ratio between the second operation moving distance and the second camera moving distance is 10:1. If the second operation moving distance is 10, the second camera moving distance is 1.
  • the computer device can map the second operation moving direction to the second camera moving direction in the depth of field direction of the virtual scene of the virtual camera according to a preset mapping relationship between the second operation moving direction and the forward and backward moving direction of the camera, wherein if the second camera moving direction is opposite to the shooting direction of the virtual camera, the virtual camera moves backward according to the second camera moving distance; if the second camera moving direction is the same as the shooting direction of the virtual camera, the virtual camera moves forward according to the second camera moving distance.
  • the second movement parameter includes a second camera movement distance and a second camera movement direction.
  • the virtual camera is controlled by the second camera moving distance and the second camera moving direction, so as to control the distance between the virtual camera and the photographed object.
  • the proportion of the subject in the second picture in the second picture is larger than the proportion of the subject in the original picture in the original picture. If the focal length of the virtual camera is reduced, the proportion of the subject in the second picture in the second picture is smaller than the proportion of the subject in the original picture in the original picture.
  • the second control logic in the second control mode, if the user operates within the default area corresponding to the perspective control, the second control logic is that sliding within the default area can control the focal length between the virtual camera and the photographed object to change, thereby capturing the second picture.
  • the virtual camera is controlled to increase the focal length according to the moving distance of the second camera to shoot the virtual scene and obtain a second picture.
  • the computer device can obtain the component of the second camera's moving direction in the Y-axis direction. If the shooting direction of the virtual camera is the same as the positive direction of the Y-axis, and the component of the second camera's moving direction in the Y-axis direction is opposite to the shooting direction of the virtual camera, then it is determined that the second camera's moving direction is opposite to the shooting direction of the virtual camera in the virtual scene.
  • the virtual camera is then controlled to increase its focal length according to the focal length parameter to shoot the virtual scene and obtain a second picture.
  • FIG. 8 is a schematic diagram of a virtual camera provided by another optional embodiment of the present application.
  • the position of the virtual camera changes from the previous position, thereby moving downward, thereby increasing the focal length between the virtual camera and the photographed object, thereby obtaining a second picture.
  • the virtual camera is controlled to reduce the focal length according to the moving distance of the second camera to shoot the virtual scene and obtain a second picture.
  • the virtual camera reduces the focal length, and the position of the virtual camera changes from the previous position, thereby moving upward, thereby reducing the focal length between the virtual camera and the photographed object, thereby obtaining a second picture.
  • the rotation direction of the virtual camera in the virtual scene is determined according to the moving direction of the third movement operation outside the default area.
  • FIG3 is a flowchart of a method for switching a viewing angle according to another optional embodiment of the present invention.
  • the method for switching a viewing angle may include the following steps:
  • a rotation direction of the virtual camera in the virtual scene is determined according to a moving direction of a third moving operation outside a default area.
  • the rotation parameter input operation includes a third movement operation outside the default area.
  • the triggering condition of the rotation parameter input operation may be that the user slides from the default area of the perspective control to outside the default area, and performs the rotation parameter input operation outside the default area.
  • the user switches from the operation in the default area to the operation outside the default area, and at this time, the computer device triggers the third control mode of the perspective control.
  • the computer device may determine the rotation direction of the virtual camera in the virtual scene according to the movement direction of the third movement operation outside the default area. For example, outside the default area, the rotation direction may be determined by the motion trajectory of the touch point, for example, if the motion trajectory of the touch point is counterclockwise, the rotation direction is counterclockwise. If the motion trajectory of the touch point is clockwise, the rotation direction is clockwise.
  • FIG. 9 is a third schematic diagram of the viewing angle control provided in the embodiment of the present application.
  • Point A is the second reference point
  • point B is the second touch point
  • point C is the third touch point
  • both the second touch point and the third touch point are outside the default area.
  • the second reference point A includes: a preset position point in the default area, or an initial touch point of the state switching operation.
  • the second touch point is the initial touch point outside the default area.
  • the user starts the touch operation in the default area, then slides outside the default area, and after the first pause outside the default area, the second touch point is determined. Then the user slides outside the default area until reaching the third touch point, and the third touch point is the current touch point outside the default area.
  • the third move operation is continuous with the state switching operation.
  • angle BAC is D
  • angle D is the angle between the second touch point and the third touch point
  • angle D is determined as the rotation angle
  • the third moving operation when the moving direction of the third moving operation at the second touch point and the angle between the line connecting the initial touch point and the end touch point of the state switching operation meet a preset angle condition, the third moving operation is valid.
  • the third operation is determined to be valid.
  • the angle is greater than or equal to a1 and less than or equal to a2, where a1 is less than 90 degrees and a2 is greater than 90 degrees.
  • FIG. 10 is a schematic diagram of a virtual camera provided by another optional embodiment of the present application.
  • the virtual camera in the virtual scene is controlled to rotate clockwise to shoot the virtual scene.
  • the rotation direction is clockwise
  • the virtual camera in the virtual scene is controlled to rotate clockwise, that is, the angle R1 is the same as the angle D mentioned above.
  • the virtual camera in the virtual scene is controlled to rotate counterclockwise to shoot the virtual scene.
  • the virtual camera in the virtual scene is controlled to rotate counterclockwise, that is, the angle R2 is the same as the angle D mentioned above.
  • a perspective control can be used to control the virtual camera to capture images at multiple angles, thereby achieving perspective control.
  • the perspective control when the perspective control is in the first control mode, in response to the first movement operation in the default area of the perspective control, the first movement parameter of the virtual camera on the vertical plane is obtained according to the first movement operation, and the virtual camera is controlled to move in the vertical plane according to the first movement parameter; in response to the state switching operation of the perspective control, the perspective control is switched to the second control mode; when the perspective control is in the second control mode, in response to the second movement operation in the default area of the perspective control, the second movement parameter of the virtual camera in the depth direction of the virtual scene is obtained according to the second movement operation, and the virtual camera is controlled to move in the depth direction of the virtual scene according to the second movement parameter.
  • different control modes can be realized through one perspective control, thereby presenting pictures of different perspectives of the virtual scene, and improving the efficiency of perspective control.
  • FIG. 11 is a schematic diagram of the structure of a perspective switching device provided by an optional embodiment of the present application.
  • the graphical user interface includes a virtual scene and a perspective control.
  • the perspective switching device 400 may include:
  • the first control module 410 is configured to execute, when the perspective control is in the first control mode, in response to a first movement operation in the default area of the perspective control, obtain a first movement parameter of the virtual camera on the vertical plane according to the first movement operation, and control the movement of the virtual camera on the vertical plane according to the first movement parameter;
  • the mode switching module 420 is configured to execute a state switching operation on the viewing angle control, switching the viewing angle control In the second control mode;
  • the second control module 430 is configured to execute when the perspective control is in the second control mode, in response to a second movement operation in the default area of the perspective control, obtain a second movement parameter of the virtual camera in the depth direction of the virtual scene according to the second movement operation, and control the virtual camera to move in the depth direction of the virtual scene according to the second movement parameter.
  • the first control module 410 is further configured to execute acquiring a first operation moving distance and a first operation moving direction of the first moving operation;
  • a first camera movement direction and a first camera movement distance of the virtual camera in the vertical plane are determined.
  • the second control module 430 is configured to perform a second movement operation to determine the first touch point currently within the default area
  • a second movement parameter of the virtual camera in the depth direction of the virtual scene is determined according to the second operation movement distance and the second operation movement direction.
  • the second control module 430 is configured to execute a preset mapping relationship between the second operation movement direction and the forward and backward movement direction of the camera, and map the second operation movement direction to the second camera movement direction in the depth of field direction of the virtual scene of the virtual camera, wherein if the second camera movement direction is opposite to the shooting direction of the virtual camera, the virtual camera moves backward according to the second camera movement distance; if the second camera movement direction is the same as the shooting direction of the virtual camera, the virtual camera moves forward according to the second camera movement distance.
  • the first reference point includes: a preset position point in the default area, or an initial touch point of the second movement operation in the default area.
  • the second movement operation and the state switching operation are continuous.
  • the mode switching module 420 is configured to switch the first control mode of the perspective control to the second control mode in response to at least two press operations on the perspective control within a preset time period.
  • the perspective switching device further includes a third control module 440 , wherein the third control module 440 is not shown in FIG. 11 .
  • the third control module 440 is configured to execute, when the perspective control is in the first control mode or the second control mode, in response to a rotation parameter input operation on the perspective control, and control the virtual camera to rotate in the virtual scene according to the camera rotation parameters corresponding to the rotation parameter input operation.
  • the third control module 440 is configured to determine the rotation direction of the virtual camera in the virtual scene according to the movement direction of the third movement operation outside the default area;
  • the virtual camera is controlled to rotate in the virtual scene according to the rotation direction and rotation angle.
  • the third moving operation is continuous with the state switching operation.
  • the second reference point includes: a preset position point of a default area, or an initial touch point of the state switching operation.
  • the third moving operation is valid.
  • the perspective control when the perspective control is in the first control mode, in response to a first movement operation in the default area of the perspective control, a first movement parameter of the virtual camera on the vertical plane is obtained according to the first movement operation, and the virtual camera is controlled to move in the vertical plane according to the first movement parameter; in response to a state switching operation on the perspective control, the perspective control is switched to the second control mode; when the perspective control is in the second control mode, in response to a second movement operation in the default area of the perspective control, a second movement parameter of the virtual camera in the depth direction of the virtual scene is obtained according to the second movement operation, and the virtual camera is controlled to move in the depth direction of the virtual scene according to the second movement parameter.
  • different control modes can be realized through one perspective control, thereby presenting images of virtual scenes from different perspectives, improving the image quality. Improves the efficiency of viewing angle control.
  • the embodiment of the present application also provides a computer device, which can be a terminal or a server, and the terminal can be a terminal device such as a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), etc.
  • Figure 12 is a structural schematic diagram of a computer device provided by an optional embodiment of the present application.
  • the computer device 500 includes a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, and a computer program stored in the memory 502 and executable on the processor.
  • the processor 501 is electrically connected to the memory 502.
  • the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
  • the processor 501 is the control center of the computer device 500. It uses various interfaces and lines to connect the various parts of the entire computer device 500, executes various functions of the computer device 500 and processes data by running or loading software programs and/or modules stored in the memory 502, and calling data stored in the memory 502, thereby monitoring the computer device 500 as a whole.
  • the processor 501 in the computer device 500 will load instructions corresponding to the processes of one or more application programs into the memory 502 according to the following steps, and the processor 501 will run the application programs stored in the memory 502 to implement various functions:
  • a first movement parameter of the virtual camera on the vertical plane is obtained according to the first movement operation, and the virtual camera is controlled to move in the vertical plane according to the first movement parameter;
  • a second movement parameter of the virtual camera in the depth direction of the virtual scene is obtained according to the second movement operation, and the virtual camera is controlled to move in the depth direction of the virtual scene according to the second movement parameter.
  • the processor 501 is further configured to execute the following functions:
  • a first camera movement direction and a first camera movement distance of the virtual camera in the vertical plane are determined.
  • the processor 501 is further configured to execute the following functions:
  • a second movement parameter of the virtual camera in the depth direction of the virtual scene is determined according to the second operation movement distance and the second operation movement direction.
  • the processor 501 is further configured to execute the following functions:
  • the second operation movement direction is mapped to the second camera movement direction in the depth of field direction of the virtual scene of the virtual camera, wherein, if the second camera movement direction is opposite to the shooting direction of the virtual camera, the virtual camera moves backward according to the second camera movement distance; if the second camera movement direction is the same as the shooting direction of the virtual camera, the virtual camera moves forward according to the second camera movement distance.
  • the processor 501 is further configured to execute the following functions:
  • the first control mode of the viewing angle control is switched to the second control mode.
  • the processor 501 is further configured to execute the following functions:
  • the processor 501 is further configured to execute the following functions:
  • the virtual camera is controlled to rotate in the virtual scene according to the rotation direction and rotation angle.
  • the processor 501 is further configured to execute the following functions:
  • the third moving operation is valid.
  • the perspective control when the perspective control is in the first control mode, in response to the first movement operation in the default area of the perspective control, the first movement parameter of the virtual camera on the vertical plane is obtained according to the first movement operation, and the virtual camera is controlled to move in the vertical plane according to the first movement parameter; in response to the state switching operation of the perspective control, the perspective control is switched to the second control mode; when the perspective control is in the second control mode, in response to the second movement operation in the default area of the perspective control, the second movement parameter of the virtual camera in the depth direction of the virtual scene is obtained according to the second movement operation, and the virtual camera is controlled to move in the depth direction of the virtual scene according to the second movement parameter.
  • different control modes can be realized through one perspective control, thereby presenting pictures of different perspectives of the virtual scene, and improving the efficiency of perspective control.
  • the computer device 500 further includes: a touch screen 503, a radio frequency circuit 504, an audio circuit 505, an input unit 506, and a power supply 507.
  • the processor 501 is electrically connected to the touch screen 503, the radio frequency circuit 504, the audio circuit 505, the input unit 506, and the power supply 507.
  • the computer device structure shown in FIG12 does not limit the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
  • the touch display screen 503 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface.
  • the touch display screen 503 may include a display panel and a touch panel.
  • the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the computer device, which can be composed of graphics, text, icons, videos and any combination thereof.
  • the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), etc.
  • LCD liquid crystal display
  • OLED Organic Light-Emitting Diode
  • the touch panel can be used to collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute the corresponding program.
  • the touch panel may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller;
  • the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 501, and can receive the command sent by the processor 501 and execute it.
  • the touch panel can cover the display panel.
  • the touch panel When the touch panel detects a touch operation on or near it, it is transmitted to the processor 501 to determine the type of touch event, and then the processor 501 provides a corresponding visual output on the display panel according to the type of touch event.
  • the touch panel and the display panel can be integrated into the touch display screen 503 to realize the input and output functions.
  • the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 503 can also be used as a part of the input unit 506 to realize the input function.
  • the processor 501 executes the application program to generate a graphical user interface on the touch screen 503.
  • the touch screen 503 is used to present the graphical user interface and receive operation instructions generated by the user acting on the graphical user interface.
  • the radio frequency circuit 504 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other computer devices through wireless communication, and to send and receive signals between the network device or other computer devices.
  • the audio circuit 505 can be used to provide an audio interface between the user and the computer device through a speaker and a microphone.
  • the audio circuit 505 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 505 and converted into audio data, and then the audio data is output to the processor 501 for processing, and then sent to another computer device through the radio frequency circuit 504, or the audio data is output to the memory 502 for further processing.
  • the audio circuit 505 may also include an earphone jack to provide communication between an external headset and the computer device.
  • the input unit 506 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • user feature information such as fingerprint, iris, facial information, etc.
  • the power supply 507 is used to supply power to various components of the computer device 500.
  • the power supply 507 can be logically connected to the processor 501 through a power management system, so that the power management system can manage charging, discharging, and power consumption.
  • the power supply 507 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
  • the computer device 500 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
  • an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any perspective switching method provided in the embodiment of the present application.
  • the computer program can execute the following steps:
  • a first movement parameter of the virtual camera on the vertical plane is obtained according to the first movement operation, and the virtual camera is controlled to move in the vertical plane according to the first movement parameter;
  • a second movement parameter of the virtual camera in the depth direction of the virtual scene is obtained according to the second movement operation, and the virtual camera is controlled to move in the depth direction of the virtual scene according to the second movement parameter.
  • the computer program is also configured to perform:
  • a first camera movement direction and a first camera movement distance of the virtual camera in the vertical plane are determined.
  • the computer program is also configured to perform:
  • a second movement parameter of the virtual camera in the depth direction of the virtual scene is determined according to the second operation movement distance and the second operation movement direction.
  • the computer program is also configured to perform:
  • the second operation moving direction is mapped to the second camera moving direction in the depth of field direction of the virtual scene of the virtual camera, wherein, if the second camera moving direction is opposite to the shooting direction of the virtual camera, the virtual camera moves backward according to the second camera moving distance, and if the second camera moves If the direction is the same as the shooting direction of the virtual camera, the virtual camera moves forward according to the moving distance of the second camera.
  • the computer program is also configured to perform:
  • the first control mode of the viewing angle control is switched to the second control mode.
  • the computer program is also configured to perform:
  • the virtual camera is controlled to rotate in the virtual scene according to the camera rotation parameters corresponding to the rotation parameter input operation.
  • the computer program is also configured to perform:
  • the virtual camera is controlled to rotate in the virtual scene according to the rotation direction and rotation angle.
  • the computer program is also configured to perform:
  • the third moving operation is valid.
  • the perspective control when the perspective control is in the first control mode, in response to the first movement operation in the default area of the perspective control, the first movement parameter of the virtual camera on the vertical plane is obtained according to the first movement operation, and the virtual camera is controlled to move in the vertical plane according to the first movement parameter; in response to the state switching operation of the perspective control, the perspective control is switched to the second control mode; when the perspective control is in the second control mode, in response to the second movement operation in the default area of the perspective control, the second movement parameter of the virtual camera in the depth direction of the virtual scene is obtained according to the second movement operation, and the virtual camera is controlled to move in the depth direction of the virtual scene according to the second movement parameter.
  • different control modes can be realized through one perspective control, thereby presenting pictures of different perspectives of the virtual scene, and improving the efficiency of perspective control.
  • the storage medium may include: read-only memory (ROM), random access memory (RAM), disk or CD, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种视角切换方法、装置、计算机设备及计算机可读存储介质。方法包括:在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,根据第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据第一移动参数控制虚拟相机在所处竖直平面移动;响应于对视角控件的状态切换操作,切换视角控件处于第二操控模式;在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,根据第二移动操作获取虚拟相机在虚拟场景的景深方向上的第二移动参数,根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。从而实现一个视角控件实现不同的操控模式。

Description

视角切换方法、装置、计算机设备及计算机可读存储介质
相关申请的交叉引用
本公开要求于2023年06月05日提交的,申请号为202310660392.3,名称为“视角切换方法、装置、计算机设备及计算机可读存储介质”的中国专利申请的优先权,该中国专利申请的全部内容通过引用结合在本文中。
技术领域
本申请涉及计算机技术领域,具体涉及一种视角切换方法、装置、计算机设备及计算机可读存储介质。
背景技术
在一些游戏场景中,当用户控制游戏角色时,会操控游戏角色来呈现出不同的视角。例如控制游戏角色在上、下、左、右、前、后等不同的方向上平移,或者控制游戏角色旋转,从而使得游戏画面呈现出不同的视角。
相关技术中,在拍照模式下,对于游戏角色的视角的操控,是在游戏画面中设置多个控件,每个控件实现对应的功能,从而控制游戏画面呈现出不同的视角。
但是,这样会导致游戏画面中的控件数量过多,控件对游戏画面造成遮挡,最终影响用户的游戏体验。
发明内容
本申请实施例提供一种视角切换方法、装置、计算机设备及计算机可读存储介质。该视角切换方法能够通过一个视角控件实现多种模式的视角控制。
第一方面,本申请实施例提供了一种视角切换方法,其中,通过计算机设备提供图形用户界面,图形用户界面中包括虚拟相机对虚拟场景进行实时拍摄得到的画面,以及显示在画面上的视角控件,视角控件被配置为具有至少两个操控模式,方法包括:
在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,根据第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据第一移动参数控制虚拟相机在所处竖直平面移动;
响应于对视角控件的状态切换操作,切换视角控件处于第二操控模式;
在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,根据第二移动操作获取虚拟相机在虚拟场景的景深方向上的第二移动参数,根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。
第二方面,本申请实施例提供了一种视角切换装置,其中,通过计算机设备提供图形用户界面,图形用户界面中包括虚拟相机对虚拟场景进行实时拍摄得到的画面,以及显示在画面上的视角控件,视角控件被配置为具有至少两个操控模式,装置包括:
第一控制模块,被配置为执行在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,根据第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据第一移动参数控制虚拟相机在所处竖直平面移动;
模式切换模块,被配置为执行响应于对视角控件的状态切换操作,切换视角控件处于第二操控模式;
第二控制模块,被配置为执行在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,根据第二移动操作获取虚拟相机在虚拟场景的景深方向上的第二移动参数,根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。
第三方面,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质存储有多条指令,指令适于处理器进行加载,以执行本申请实施例中提供的视角切换方法。
第四方面,本申请实施例提供了一种计算机设备,包括存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时实现本申请实施例提供的视角切换方法。
本申请实施例中,在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,根据第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据第一移动参数控制虚拟相机在所处竖直平面移动;响应于对视角控件的状态切换操作,切换视角控件处于第二操控模式;在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,根据第二移动操作获取虚拟相机在虚拟场景的景深方向上的第二移动参数,根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。从而实现通过一个视角控件实现不同的操控模式,从而呈现出虚拟场景的不同视角的画面,提高了视角控制的效率。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请其中之一可选实施例提供的视角切换方法的流程示意图。
图2是本申请其中之一可选实施例提供的视角切换方法的流程示意图。
图3是本申请其中之一可选实施例提供的视角切换方法的流程示意图。
图4是本申请其中之一可选实施例提供的视角控件的示意图。
图5是本申请其中之一可选实施例提供的虚拟相机的示意图。
图6是本申请其中之一可选实施例提供的虚拟相机的示意图。
图7是本申请其中之一可选实施例提供的视角控件的示意图。
图8是本申请其中之一可选实施例提供的虚拟相机的示意图。
图9是本申请其中之一可选实施例提供的视角控件的示意图。
图10是本申请其中之一可选实施例提供的虚拟相机的示意图。
图11是本申请其中之一可选实施例提供的视角切换装置的结构示意图。
图12是本申请其中之一可选实施例提供的计算机设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在一些游戏场景中,当用户控制游戏角色时,会操控游戏角色来呈现出不同的视角。例如控制游戏角色在上、下、左、右、前、后等不同的方向上平移,或者控制游戏角色旋转,从而使得游戏画面呈现出不同的视角。
相关技术中,对于游戏角色的视角的操控,是在游戏画面中设置多个控件,每个控件实现对应的功能,从而控制游戏画面呈现出不同的视角。
但是,这样会导致游戏画面中的控件数量过多,控件对游戏画面造成遮挡,最终影响用户的游戏体验。
为了解决上述技术问题,本申请实施例提供了一种视角切换方法、装置、计算机设备及计算机可读存储介质。该视角切换方法能够通过一个视角控件实现多种模式的视角控制。
需要说明的是,本申请所提供的视角切换方法可以应用于手机、电脑等计算机设备,计算机设备提供图形用户界面,通过图形用户界面可以显示虚拟场景和虚拟场景中的视角控件。其中,虚拟场景可以是游戏场景,视角控件可以是游戏场景中的游戏角色对应的控 件。
请参阅图1,图1是本申请一可选实施例提供的视角切换方法的流程示意图。该视角切换方法可以包括如下步骤:
110、在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,根据第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据第一移动参数控制虚拟相机在所处竖直平面移动。
在一些实施方式中,视角控件对应有多种操控模式,每一操控模式下的视角控件的图标有所不同。视角控件默认的操控模式为第一操控模式,当视角控件的操控模式为第一操控模式时,则用户操控视角控件时,计算机设备可以捕获视角控件的第一移动参数。
例如,当视角控件的操控模式为第一操控模式时,用户可以通过点击、拖动、滑动等方式来操控视角控件,从而在视角控件的默认区域中进行第一移动操作。其中视角控件的默认区域可以理解为是一个图标区域,比如视角控件的图标是圆形的,则默认区域则为该视角控件的圆形图标区域。
当视角控件的操控模式为第一操控模式时,针对于视角控件操作的触控点在视角控件对应的默认区域内。比如视角控件为圆形图标,该圆形图标的半径为R,那么预设范围可以是该圆形图标的圆心为中心、半径范围为3R的圆形范围。具体可以根据实际视角操作需求而设定。在此仅做例举,不对本申请做出限制。
具体地,用户在操控视角控件的时候,计算机设备可以捕获用户的触控点,然后根据触动点的移动距离、移动方向来确定出第一移动操作。
在一些实施方式中,当视角控件的操控模式为第一操控模式时,视角控件对应的操控逻辑为第一操控模式的第一操控逻辑,即用户操作视角控件时,按照第一操控逻辑来实现控制视角。
在一些实施方式中,当视角控件的操控模式为第一操控模式时,视角控件对应的图标为第一显示图标,第一显示图标有助于用户了解视角控件当前对应的操控模式。
例如,在用户操控视角控件的时候,视角控件有对应的触控点,该触控点可以是用户通过手指触摸触控显示屏所生成的触控点,该触控点还可以是用户通过鼠标等外设在屏幕上生成的触控点。计算机设备可以根据触控点来确定出第一移动操作。
在一些实施方式中,计算机设备可以获取第一移动操作的第一操作移动距离和第一操作移动方向;根据第一操作移动距离和第一操作移动方向,确定虚拟相机在所处竖直平面的第一相机移动方向和第一相机移动距离,其中第一移动参数包括第一相机移动距离和第一相机移动方向。
在一些实施方式中,计算机设备可以根据第一移动距离确定出虚拟相机在虚拟场景中对应比例的第一相机移动距离;将第一移动方向确定为虚拟相机在虚拟场景中的第一相机移动方向;根据第一相机移动距离和第一相机移动方向控制虚拟相机在所处的竖直平面内移动,从而使得虚拟相机拍摄出第一画面。
例如,当第一操控模式下,在三维的虚拟场景中,虚拟相机在竖直平面内移动,比如虚拟相机面对拍摄物体,虚拟相机在竖直平面内进行上下左右移动。比如虚拟相机的移动方向和虚拟相机的拍摄方向垂直。
此时,计算机设备可以建立虚拟相机移动时对应的平面坐标系,然后移动距离和移动方向设置在该平面坐标系中,从而得到移动距离和移动方向对应的向量。然后获取该向量在坐标轴上对应的分向量,然后将分向量的方向垂直于虚拟相机的拍摄方向的分向量确定为目标分向量,然后确定出目标分向量的方向为虚拟相机对应的第一相机移动方向,然后将目标分向量的模乘以对应的比例,则得到虚拟相机对应的第一相机移动距离。
在一些实施方式中,在得到第一相机移动距离和第一相机移动方向之后,计算机设备可以根据第一相机移动距离和第一相机移动方向来移动虚拟相机,从而使得虚拟相机在不 同的位置拍摄被拍摄物体,从而在图形用户界面中呈现出虚拟场景对应的画面。
120、响应于对视角控件的状态切换操作,切换视角控件处于第二操控模式。
在一些实施方式中,计算机设备可以响应于对视角控件的在预设时长内的至少两次按下操作,则将视角控件的第一操控模式切换为第二操控模式。
例如,在视角控件的图标内,用户连续按下两次,且这两次按下操作均在预设时长内,则确定触发视角控件的第二操控模式的触发条件,则用户可以通过第二操控模式来操控视角控件来切换虚拟场景中的虚拟场景的拍摄视角。其中,触发操作还可以是点击、按压等其他操作。
在一些实施方式中,当接收到视角控件的第二操控模式的触发条件时,将视角控件的第一操控模式的第一显示图标切换为第二操控模式的第二显示图标;将视角控件的第一操控模式的第一操控逻辑切换为第二操控模式的第二操控逻辑。
通过视角控件对应的图标切换来提醒用户视角控件的操控模式进入了第二操控模式。
需要说明的是,第二操控逻辑和第一操控逻辑时不同的,视角控件对应的控制方式也发生改变。
计算机设备可以获取用户针对于视角控件的触控操作,例如用户在视角控件的控制区域内,通过滑动、拖动的方式来进行第二移动操作,计算机从而捕获第二移动参数。
130、在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,根据第二移动操作获取虚拟相机在虚拟场景的景深方向上的第二移动参数,根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。
在一些实施方式中,计算机设备可以确定第二移动操作当前在默认区域内的第一触控点;确定第一触控点与视角控件的默认区域内第一参考点之间的第二操作移动距离,以及从第一参考点至第一触控点的第二操作移动方向;根据第二操作移动距离和第二操作移动方向确定虚拟相机在虚拟场景的景深方向上的第二移动参数。其中,第二移动参数包括第二相机移动方向和第二相机移动距离。
具体地,计算机设备可以根据第二操作移动距离确定虚拟相机在虚拟场景的景深方向上的第二相机移动距离。例如,可以根据预设的比例关系,来计算出第二操作移动距离对应的第二相机移动距离。
具体地,计算机设备可以根据第二操作移动方向与相机前后移动方向的预设映射关系,将第二操作移动方向映射为虚拟相机虚拟场景的景深方向上的第二相机移动方向,其中,若第二相机移动方向与虚拟相机的拍摄方向相反,则虚拟相机按照第二相机移动距离向后移动,若第二相机移动方向与虚拟相机的拍摄方向相同,则虚拟相机按照第二相机移动距离向前移动。
例如,用户在触控屏幕的时候,在屏幕上进行上下滑动时,当第二操作移动方向为向上滑动,则虚拟相机对应的移动方向为在景深方向上朝向被拍摄物体移动。当第二操作移动方向为向下滑动,则虚拟相机对应的移动方向为在景深方向上背向被拍摄物体移动。
可以理解的是,在第二操控模式下,通过第二相机移动距离和第二相机移动方向来对虚拟相机进行操控,从而控制虚拟相机和被拍摄物体之间的距离。
例如,若增大虚拟相机的焦距,则第二画面中被拍摄主体在第二画面中的占比相对于原画面中被拍摄主体在原画面中的占比更大。若缩小虚拟相机的焦距,则第二画面中被拍摄主体在第二画面中的占比相对于原画面中被拍摄主体在原画面中的占比更小。
因此,在本申请实施例中,可以通过触发第二操控模式的情况下,通过对视角控件的操作,从而实现控制虚拟相机改变与被拍摄物体之间的距离,从而实现改变焦距,从而使得虚拟相机拍摄出虚拟场景中被拍摄物体对应的画面。
由上述内容可知,在本申请实施例中,通过设置一个视角控件来赋予不同的操控模式,从而在不同的操控模式下,用户可以通过该视角控件调整虚拟相机的拍摄角度,从而得到 不同视角下的虚拟场景中的画面,从而提升了视角切换的效率。
需要说明的是,在本申请实施例中,对于视角控件控制的过程,可以是在一种游戏编辑过程,还可以是一种游戏编辑的场景,比如对游戏中的某一画面进行拍摄,即可用于对游戏场景的拍摄。当然,还可以用于对游戏场景中的游戏角色的视角控制,还可以应用于单独对游戏场景的视角控制,在此不作限制。
相当于一种游戏编辑过程/场景,不是一般的游戏运行场景当中游戏视角的控制。
本申请实施例中,在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,根据第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据第一移动参数控制虚拟相机在所处竖直平面移动;响应于对视角控件的状态切换操作,切换视角控件处于第二操控模式;在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,根据第二移动操作获取虚拟相机在虚拟场景的景深方向上的第二移动参数,根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。从而实现通过一个视角控件实现不同的操控模式,从而呈现出虚拟场景的不同视角的画面,提高了视角控制的效率。
为了更加详细的说明本申请实施例所提供的视角切换方法,请继续参阅图2,图2是本申请另一可选实施例提供的视角切换方法的流程示意图,该视角切换方法可以包括如下步骤:
201、在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,获取第一移动操作的第一操作移动距离和第一操作移动方向。
在一些实施方式中,视角控件对应有多种操控模式,每一操控模式下的视角控件的图标有所不同。视角控件默认的操控模式为第一操控模式,当视角控件的操控模式为第一操控模式时,则用户操控视角控件时,计算机设备可以捕获视角控件的第一移动参数。
例如,当视角控件的操控模式为第一操控模式时,用户可以通过点击、拖动、滑动等方式来操控视角控件,从而在视角控件的默认区域中进行第一移动操作。其中视角控件的默认区域可以理解为是一个图标区域,比如视角控件的图标是圆形的,则默认区域则为该视角控件的圆形图标区域。
在一些实施方式中,当视角控件的操控模式为第一操控模式时,视角控件对应的操控逻辑为第一操控模式的第一操控逻辑,即用户操作视角控件时,按照第一操控逻辑来实现控制视角。
在一些实施方式中,当视角控件的操控模式为第一操控模式时,视角控件对应的图标为第一显示图标,第一显示图标有助于用户了解视角控件当前对应的操控模式。
请一并参阅图4,是本申请一可选实施例提供的视角控件的示意图。
其中,当视角控件的操控模式为第一操控模式时,视角控件的显示图标为第一显示图标。
在用户操控视角控件的时候,视角控件有对应的触控点,该触控点可以是用户通过手指触摸触控显示屏所生成的触控点,该触控点还可以是用户通过鼠标等外设在屏幕上生成的触控点。
其中,通过第一移动操作获取第一移动参数,第一移动操作包含了视角控件对应的触控点的第一操作移动距离和第一操作移动方向。例如,当视角控件的操控模式为第一操控模式时,可以获取用户对视角控件进行操作的初始触控点和最终触控点,然后从初始触控点到最终触控点,从而获取触控点的第一操作移动距离和第一操作移动方向。
需要说明的是,当视角控件的操控模式为第一操控模式时,针对于视角控件操作的触控点在视角控件对应的预设范围内,该预设范围内为视角控件对应的默认区域。比如视角控件为圆形图标,该圆形图标的半径为R,那么预设范围可以是该圆形图标的圆心为中心、半径范围为R的圆形范围。具体可以根据实际视角操作需求而设定。又或者,该圆形图标 的范围就是预设范围。在此仅做例举,不对本申请做出限制。
如图4所示,若以中心点为初始触控点,当用户在预设范围内的最终触控点在初始触控点的正上方时,即图4中的Y轴正方向时,此时第一操作移动方向就是Y轴正方向,第一操作移动距离就是最终触控点的Y轴坐标值减去初始触控点的Y轴坐标值。
若以中心点为初始触控点,当用户在预设范围内的最终触控点在初始触控点的正右方时,即图4中的X轴正方向时,此时第一操作移动方向就是X轴正方向,第一操作移动距离就是最终触控点的X轴坐标值减去初始触控点的X轴坐标值。
202、根据第一操作移动距离和第一操作移动方向,确定虚拟相机在所处竖直平面的第一相机移动方向和第一相机移动距离,第一移动参数包括第一相机移动方向和第一相机移动距离。
在一些实施方式中,计算机设备可以获取第一移动操作的第一操作移动距离和第一操作移动方向;根据第一操作移动距离和第一操作移动方向,确定虚拟相机在所处竖直平面的第一相机移动方向和第一相机移动距离,其中第一移动参数包括第一相机移动距离和第一相机移动方向。
在一些实施方式中,计算机设备可以根据第一移动距离确定出虚拟相机在虚拟场景中对应比例的第一相机移动距离;将第一移动方向确定为虚拟相机在虚拟场景中的第一相机移动方向;根据第一相机移动距离和第一相机移动方向控制虚拟相机在所处的竖直平面内移动,从而使得虚拟相机拍摄出第一画面。
例如,当第一操控模式下,在三维的虚拟场景中,虚拟相机在竖直平面内移动,比如虚拟相机面对拍摄物体,虚拟相机在竖直平面内进行上下左右移动。比如虚拟相机的移动方向和虚拟相机的拍摄方向垂直。
此时,计算机设备可以建立虚拟相机移动时对应的平面坐标系,然后移动距离和移动方向设置在该平面坐标系中,从而得到移动距离和移动方向对应的向量。然后获取该向量在坐标轴上对应的分向量,然后将分向量的方向垂直于虚拟相机的拍摄方向的分向量确定为目标分向量,然后确定出目标分向量的方向为虚拟相机对应的第一相机移动方向,然后将目标分向量的模乘以对应的比例,则得到虚拟相机对应的第一相机移动距离。
203、根据第一移动参数控制虚拟相机在所处竖直平面移动。
在一些实施方式中,在得到第一相机移动距离和第一相机移动方向之后,计算机设备可以根据第一相机移动距离和第一相机移动方向来移动虚拟相机,从而使得虚拟相机在不同的位置拍摄被拍摄物体,从而在图形用户界面中呈现出虚拟场景对应的画面。
在一些实施方式中,可以在虚拟相机在所属的竖直平面内根据第一相机移动距离和第一相机移动方向来控制虚拟相机移动。虚拟相机从而拍摄训场景得到第一画面,计算机设备通过图形用户界面展示该第一画面。
在一些实施场景中,第一画面相对于原画面,仅仅是实现了画面平移,即如果一个被拍摄物体在原画面左侧,则平移虚拟相机之后,第一画面中被拍摄物体在右侧。
请一并参阅图5和图6,图5是本申请一可选实施例提供的虚拟相机的示意图。图6是本申请另一可选实施例提供的虚拟相机的示意图。
若触控点的移动方向为沿着X轴方向移动,那么垂直于X轴的虚拟相机被控制左右移动。
若触控点的移动方向为沿着Y轴方向移动,那么垂直于Y轴的虚拟相机被控制上下移动。
也就是说,第一操控模式下,可以控制虚拟相机沿着垂直于拍摄方向的平面内来移动,从而实现视角的切换。
204、响应于对视角控件的状态切换操作,切换视角控件处于第二操控模式。
在一些实施方式中,计算机设备可以响应于对视角控件的在预设时长内的至少两次按 下操作,则将视角控件的第一操控模式切换为第二操控模式。
例如,在视角控件的图标内,用户连续按下两次,且这两次按下操作均在预设时长内,则确定触发视角控件的第二操控模式的触发条件,则用户可以通过第二操控模式来操控视角控件来切换虚拟场景中的虚拟场景的拍摄视角。其中,触发操作还可以是点击、按压等其他操作。
在一些实施方式中,当接收到视角控件的第二操控模式的触发条件时,将视角控件的第一操控模式的第一显示图标切换为第二操控模式的第二显示图标;将视角控件的第一操控模式的第一操控逻辑切换为第二操控模式的第二操控逻辑。
通过视角控件对应的图标切换来提醒用户视角控件的操控模式进入了第二操控模式。
在一些实施方式中,还可以通过其他方式来触发第二操控模式的触发条件,例如,当按压压力值大于预设压力值的时候,则触发第二操控模式的触发条件。当按压面积大于预设按压面积的时候,则触发第二操控模式的触发条件。在此不作限制。
需要说明的是,第二操控逻辑和第一操控逻辑时不同的,视角控件对应的控制方式也发生改变。
计算机设备可以获取用户针对于视角控件的触控操作,例如用户在视角控件的控制区域内,通过滑动、拖动的方式来进行第二移动操作,计算机从而捕获第二移动参数。
需要说明的是,第二移动操作和状态切换操作连续。
205、在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,确定第二移动操作当前在默认区域内的第一触控点。
在一些实施方式中,在第二操控模式下获取用户在视角控件的默认区域内的第一触控点,该第一触控点可以是视角控件的默认区域内当前最新的触控点。
206、确定第一触控点与视角控件的默认区域内第一参考点之间的第二操作移动距离,以及从第一参考点至第一触控点的第二操作移动方向。
请一并参阅图7,图7是本申请另一可选实施例提供的视角控件的示意图。
其中,在默认区域内设置有第一参考点,该第一参考点可以是默认区域的预设位置点,比如第二显示图标的中心点。或者,第一参考点可以是第二移动操作在默认区域内的初始触控点。第一触控点可以是默认区域内的最终触控点。第一触控点还可以是默认区域内当前的触控点。
计算机设备可以确定第一触控点与视角控件的默认区域内第一参考点之间的第二操作移动距离,以及从第一参考点至第一触控点的第二操作移动方向。
207、根据第二操作移动距离确定虚拟相机在虚拟场景的景深方向上的第二相机移动距离。
在一些实施方式中,计算机设备可以根据第二操作移动距离确定虚拟相机在虚拟场景的景深方向上的第二相机移动距离。例如,可以根据预设的比例关系,来计算出第二操作移动距离对应的第二相机移动距离。
比如,第二操作移动距离和第二相机移动距离之间的比例为10:1,若第二操作移动距离为10,则第二相机移动距离为1。
208、根据第二操作移动方向与相机前后移动方向的预设映射关系,将第二操作移动方向映射为虚拟相机虚拟场景的景深方向上的第二相机移动方向。
具体地,计算机设备可以根据第二操作移动方向与相机前后移动方向的预设映射关系,将第二操作移动方向映射为虚拟相机虚拟场景的景深方向上的第二相机移动方向,其中,若第二相机移动方向与虚拟相机的拍摄方向相反,则虚拟相机按照第二相机移动距离向后移动,若第二相机移动方向与虚拟相机的拍摄方向相同,则虚拟相机按照第二相机移动距离向前移动。
例如,用户在触控屏幕的时候,在屏幕上进行上下滑动时,当第二操作移动方向为向 上滑动,则虚拟相机对应的移动方向为在景深方向上朝向被拍摄物体移动。当第二操作移动方向为向下滑动,则虚拟相机对应的移动方向为在景深方向上背向被拍摄物体移动。
其中,第二移动参数包括第二相机移动距离和第二相机移动方向。
209、根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。
可以理解的是,在第二操控模式下,通过第二相机移动距离和第二相机移动方向来对虚拟相机进行操控,从而控制虚拟相机和被拍摄物体之间的距离。
例如,若增大虚拟相机的焦距,则第二画面中被拍摄主体在第二画面中的占比相对于原画面中被拍摄主体在原画面中的占比更大。若缩小虚拟相机的焦距,则第二画面中被拍摄主体在第二画面中的占比相对于原画面中被拍摄主体在原画面中的占比更小。
在一些实施方式中,在第二操控模式下,若用户是在视角控件对应的默认区域内操控的,则第二操控逻辑为在默认区域内滑动可以控制虚拟相机和被拍摄物体之间的焦距发生改变,从而捕获到第二画面。
若第二相机移动方向与虚拟场景中的虚拟相机的拍摄方向相反,则根据第二相机移动距离控制虚拟相机增大焦距,以拍摄虚拟场景,得到第二画面。
计算机设备可以通过获取第二相机移动方向在Y轴方向上的分量,若虚拟相机的拍摄方向和Y轴正方向相同,且第二相机移动方向在Y轴方向上的分量与虚拟相机的拍摄方向相反,则确定第二相机移动方向与虚拟场景中的虚拟相机的拍摄方向相反,则根据焦距参数控制虚拟相机增大焦距,以拍摄虚拟场景,得到第二画面。
请一并参阅图8,图8是本申请另一可选实施例提供的虚拟相机的示意图。
若虚拟相机增大与被拍摄物体之间的焦距,则虚拟相机的位置从上一位置发生改变,从而向下移动,从而增大虚拟相机与被拍摄对象之间的焦距。从而得到第二画面。
若第二相机移动方向与虚拟场景中的虚拟相机的拍摄方向相同,则根据第二相机移动距离控制虚拟相机缩小焦距,以拍摄虚拟场景,得到第二画面。
如图8所示,若第一方向与虚拟场景中的虚拟相机的拍摄方向相同,则虚拟相机缩小焦距,虚拟相机的位置从上一位置发生改变,从而向上移动,从而缩小虚拟相机与被拍摄对象之间的焦距。从而得到第二画面。
在一些实施方式中,在视角控件处于第一操控模式或者第二操控模式下,响应于对视角控件的旋转参数输入操作,根据第三移动操作在默认区域外的移动方向确定虚拟相机在虚拟场景中的旋转方向。
具体参阅图3,图3是本申请另一可选实施例提供的视角切换方法的流程示意图。该视角切换方法可以包括如下步骤:
301、在视角控件处于第一操控模式或者第二操控模式下,响应于对视角控件的旋转参数输入操作,根据第三移动操作在默认区域外的移动方向确定虚拟相机在虚拟场景中的旋转方向。
旋转参数输入操作包括在默认区域外的第三移动操作。
旋转参数输入操作的触发条件可以是用户从视角控件的默认区域内滑动至默认区域外,且在默认区域外来实现旋转参数的输入操作。例如,在第一操控模式下或第二操作模式下,用户从默认区域内的操作该换位默认区域外的操作,此时,计算机设备触发视角控件的第三操控模式。
在一些实施方式中,计算机设备可以根据第三移动操作在默认区域外的移动方向确定虚拟相机在虚拟场景中的旋转方向。例如,在默认区域外,可以通过触控点的运动轨迹来确定出旋转方向,比如触控点的运动轨迹为逆时针方向,则旋转方向为逆时针方向。若触控点的运动轨迹为顺时针方向,则旋转方向为顺时针方向。
302、获取第三移动操作在默认区域外初始的第二触控点和当前的第三触控点。
请一并参阅图9,图9是本申请实施例提供的视角控件的第三示意图。
其中点A为第二参考点,点B为第二触控点,点C为第三触控点,第二触控点和第三触控点均在默认区域之外。第二参考点A包括:默认区域的预设位置点,或者,状态切换操作的初始触控点。
其中第二触控点为默认区域外的初始的触控点,比如用户在默认区域内开始触控操作,然后滑动至默认区域外,在默认区域外第一次停顿之后,从而确定出第二触控点。然后用户在默认区域外进行滑动,直至到第三触控点,第三触控点为默认区域外的当前触控点。
在一些实施方式中,第三移动操作与状态切换操作连续。
303、确定在旋转方向上默认区域内的第二参考点到第二触控点的连线与到第三触控点的连线的夹角,根据夹角确定虚拟相机在虚拟场景中的旋转角度。
如图9所示,以第二参考点为原点,连接参考点和第二触控点,以及连接参考点和第三触控点,从而得到角BAC,角BAC的角度为D,那么角度D就是第二触控点和第三触控点之间的角度,将角度D确定为旋转角度。
在一些实施方式中,第三移动操作在第二触控点处的移动方向,与状态切换操作的初始触控点和结束触控点的连线之间的角度,满足预设角度条件时,第三移动操作有效。
例如,当视角空间的默认区域为圆形区域时,第二触控点和第三触控点之间的连线与该圆形区域之间的切线方向之间的角度在预设角度范围内时,则确定第三操作有效。比如该角度大于或等于a1且小于或等于a2,其中a1小于90度,a2大于90度。
304、根据旋转方向和旋转角度控制虚拟相机在虚拟场景中旋转。
请一并参阅图10,图10是本申请另一可选实施例提供的虚拟相机的示意图。
若旋转方向为顺时针方向,则控制虚拟场景中的虚拟相机顺时针旋转角度,以拍摄虚拟场景。
其中,若旋转方向为顺时针方向,则控制虚拟场景中的虚拟相机顺时针旋转角度,即角度R1和上述中的角度D是相同的。
若旋转方向为逆时针方向,则控制虚拟场景中的虚拟相机逆时针旋转角度,以拍摄虚拟场景。
其中,若旋转方向为逆时针方向,则控制虚拟场景中的虚拟相机逆时针旋转角度,即角度R2和上述中的角度D是相同的。
由上述可知,在本申请实施例中,可以通过一个视角控件来实现控制虚拟相机来进行多个角度的画面采集,从而实现视角控制。
本申请实施例中,在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,根据第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据第一移动参数控制虚拟相机在所处竖直平面移动;响应于对视角控件的状态切换操作,切换视角控件处于第二操控模式;在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,根据第二移动操作获取虚拟相机在虚拟场景的景深方向上的第二移动参数,根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。从而实现通过一个视角控件实现不同的操控模式,从而呈现出虚拟场景的不同视角的画面,提高了视角控制的效率。
从而实现了通过一个视角控件实现多种视角控制,提升了视角切换的效率,同时因为只有一个视角控件,对虚拟场景的遮挡较少。
请参阅图11,图11是本申请一可选实施例提供的视角切换装置的结构示意图,图形用户界面中包括虚拟场景和视角控件,该视角切换装置400可以包括:
第一控制模块410,被配置为执行在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,根据第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据第一移动参数控制虚拟相机在所处竖直平面移动;
模式切换模块420,被配置为执行响应于对视角控件的状态切换操作,切换视角控件 处于第二操控模式;
第二控制模块430,被配置为执行在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,根据第二移动操作获取虚拟相机在虚拟场景的景深方向上的第二移动参数,根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。
在一些实施方式中,第一控制模块410还被配置为执行获取第一移动操作的第一操作移动距离和第一操作移动方向;
根据第一操作移动距离和第一操作移动方向,确定虚拟相机在所处竖直平面的第一相机移动方向和第一相机移动距离。
在一些实施方式中,第二控制模块430,被配置为执行确定第二移动操作当前在默认区域内的第一触控点;
确定第一触控点与视角控件的默认区域内第一参考点之间的第二操作移动距离,以及从第一参考点至第一触控点的第二操作移动方向;
根据第二操作移动距离和第二操作移动方向确定虚拟相机在虚拟场景的景深方向上的第二移动参数。
在一些实施方式中,第二控制模块430,被配置为执行根据第二操作移动方向与相机前后移动方向的预设映射关系,将第二操作移动方向映射为虚拟相机虚拟场景的景深方向上的第二相机移动方向,其中,若第二相机移动方向与虚拟相机的拍摄方向相反,则虚拟相机按照第二相机移动距离向后移动,若第二相机移动方向与虚拟相机的拍摄方向相同,则虚拟相机按照第二相机移动距离向前移动。
其中,第一参考点包括:默认区域的预设位置点,或者,第二移动操作在默认区域内的初始触控点。第二移动操作和状态切换操作连续。
在一些实施方式中,模式切换模块420,被配置为执行响应于对视角控件的在预设时长内的至少两次按下操作,则将视角控件的第一操控模式切换为第二操控模式。
在一些实施方式中,所述视角切换装置还包括第三控制模块440,其中第三控制模块440在图11中并未示出。
第三控制模块440,被配置为执行在视角控件处于第一操控模式或者第二操控模式下,响应于对视角控件的旋转参数输入操作,根据旋转参数输入操作对应的相机旋转参数控制虚拟相机在虚拟场景中旋转。
在一些实施方式中,第三控制模块440,被配置为执行根据第三移动操作在默认区域外的移动方向确定虚拟相机在虚拟场景中的旋转方向;
获取第三移动操作在默认区域外初始的第二触控点和当前的第三触控点;
确定在旋转方向上默认区域内的第二参考点到第二触控点的连线与到第三触控点的连线的夹角,根据夹角确定虚拟相机在虚拟场景中的旋转角度;
根据旋转方向和旋转角度控制虚拟相机在虚拟场景中旋转。
其中,第三移动操作与状态切换操作连续。第二参考点包括:默认区域的预设位置点,或者,状态切换操作的初始触控点。
其中,第三移动操作在第二触控点处的移动方向,与状态切换操作的初始触控点和结束触控点的连线之间的角度,满足预设角度条件时,第三移动操作有效。
本申请实施例中,在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,根据第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据第一移动参数控制虚拟相机在所处竖直平面移动;响应于对视角控件的状态切换操作,切换视角控件处于第二操控模式;在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,根据第二移动操作获取虚拟相机在虚拟场景的景深方向上的第二移动参数,根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。从而实现通过一个视角控件实现不同的操控模式,从而呈现出虚拟场景的不同视角的画面,提高 了视角控制的效率。
相应的,本申请实施例还提供一种计算机设备,该计算机设备可以为终端或者服务器,该终端可以为智能手机、平板电脑、笔记本电脑、触控屏幕、游戏机、个人计算机(PC,Personal Computer)、个人数字助理(Personal Digital Assistant,PDA)等终端设备。如图12所示,图12是本申请一可选实施例提供的计算机设备的结构示意图。该计算机设备500包括有一个或者一个以上处理核心的处理器501、有一个或一个以上计算机可读存储介质的存储器502及存储在存储器502上并可在处理器上运行的计算机程序。其中,处理器501与存储器502电性连接。本领域技术人员可以理解,图中示出的计算机设备结构并不构成对计算机设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
处理器501是计算机设备500的控制中心,利用各种接口和线路连接整个计算机设备500的各个部分,通过运行或加载存储在存储器502内的软件程序和/或模块,以及调用存储在存储器502内的数据,执行计算机设备500的各种功能和处理数据,从而对计算机设备500进行整体监控。
在本申请实施例中,计算机设备500中的处理器501会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器502中,并由处理器501来运行存储在存储器502中的应用程序,从而实现各种功能:
在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,根据第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据第一移动参数控制虚拟相机在所处竖直平面移动;
响应于对视角控件的状态切换操作,切换视角控件处于第二操控模式;
在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,根据第二移动操作获取虚拟相机在虚拟场景的景深方向上的第二移动参数,根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。
处理器501还被配置为执行实现功能:
获取第一移动操作的第一操作移动距离和第一操作移动方向;
根据第一操作移动距离和第一操作移动方向,确定虚拟相机在所处竖直平面的第一相机移动方向和第一相机移动距离。
处理器501还被配置为执行实现功能:
确定第二移动操作当前在默认区域内的第一触控点;
确定第一触控点与视角控件的默认区域内第一参考点之间的第二操作移动距离,以及从第一参考点至第一触控点的第二操作移动方向;
根据第二操作移动距离和第二操作移动方向确定虚拟相机在虚拟场景的景深方向上的第二移动参数。
处理器501还被配置为执行实现功能:
根据第二操作移动距离确定虚拟相机在虚拟场景的景深方向上的第二相机移动距离;
根据第二操作移动方向与相机前后移动方向的预设映射关系,将第二操作移动方向映射为虚拟相机虚拟场景的景深方向上的第二相机移动方向,其中,若第二相机移动方向与虚拟相机的拍摄方向相反,则虚拟相机按照第二相机移动距离向后移动,若第二相机移动方向与虚拟相机的拍摄方向相同,则虚拟相机按照第二相机移动距离向前移动。
处理器501还被配置为执行实现功能:
响应于对视角控件的在预设时长内的至少两次按下操作,则将视角控件的第一操控模式切换为第二操控模式。
处理器501还被配置为执行实现功能:
在视角控件处于第一操控模式或者第二操控模式下,响应于对视角控件的旋转参数输 入操作,根据旋转参数输入操作对应的相机旋转参数控制虚拟相机在虚拟场景中旋转。
处理器501还被配置为执行实现功能:
根据第三移动操作在默认区域外的移动方向确定虚拟相机在虚拟场景中的旋转方向;
获取第三移动操作在默认区域外初始的第二触控点和当前的第三触控点;
确定在旋转方向上默认区域内的第二参考点到第二触控点的连线与到第三触控点的连线的夹角,根据夹角确定虚拟相机在虚拟场景中的旋转角度;
根据旋转方向和旋转角度控制虚拟相机在虚拟场景中旋转。
处理器501还被配置为执行实现功能:
第三移动操作在第二触控点处的移动方向,与状态切换操作的初始触控点和结束触控点的连线之间的角度,满足预设角度条件时,第三移动操作有效。
本申请实施例中,在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,根据第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据第一移动参数控制虚拟相机在所处竖直平面移动;响应于对视角控件的状态切换操作,切换视角控件处于第二操控模式;在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,根据第二移动操作获取虚拟相机在虚拟场景的景深方向上的第二移动参数,根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。从而实现通过一个视角控件实现不同的操控模式,从而呈现出虚拟场景的不同视角的画面,提高了视角控制的效率。
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。
可选的,如图12所示,计算机设备500还包括:触控显示屏503、射频电路504、音频电路505、输入单元506以及电源507。其中,处理器501分别与触控显示屏503、射频电路504、音频电路505、输入单元506以及电源507电性连接。本领域技术人员可以理解,图12中示出的计算机设备结构并不构成对计算机设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
触控显示屏503可用于显示图形用户界面以及接收用户作用于图形用户界面产生的操作指令。触控显示屏503可以包括显示面板和触控面板。其中,显示面板可用于显示由用户输入的信息或提供给用户的信息以及计算机设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。触控面板可用于收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板上或在触控面板附近的操作),并生成相应的操作指令,且操作指令执行对应程序。可选的,触控面板可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器501,并能接收处理器501发来的命令并加以执行。触控面板可覆盖显示面板,当触控面板检测到在其上或附近的触摸操作后,传送给处理器501以确定触摸事件的类型,随后处理器501根据触摸事件的类型在显示面板上提供相应的视觉输出。在本申请实施例中,可以将触控面板与显示面板集成到触控显示屏503而实现输入和输出功能。但是在某些实施例中,触控面板与触控面板可以作为两个独立的部件来实现输入和输出功能。即触控显示屏503也可以作为输入单元506的一部分实现输入功能。
在本申请实施例中,通过处理器501执行应用程序在触控显示屏503上生成图形用户界面。该触控显示屏503用于呈现图形用户界面以及接收用户作用于图形用户界面产生的操作指令。
射频电路504可用于收发射频信号,以通过无线通信与网络设备或其他计算机设备建立无线通讯,与网络设备或其他计算机设备之间收发信号。
音频电路505可以用于通过扬声器、传声器提供用户与计算机设备之间的音频接口。音频电路505可将接收到的音频数据转换后的电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路505接收后转换为音频数据,再将音频数据输出处理器501处理后,经射频电路504以发送给比如另一计算机设备,或者将音频数据输出至存储器502以便进一步处理。音频电路505还可能包括耳塞插孔,以提供外设耳机与计算机设备的通信。
输入单元506可用于接收输入的数字、字符信息或用户特征信息(例如指纹、虹膜、面部信息等),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。
电源507用于给计算机设备500的各个部件供电。可选的,电源507可以通过电源管理系统与处理器501逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源507还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。
尽管图12中未示出,计算机设备500还可以包括摄像头、传感器、无线保真模块、蓝牙模块等,在此不再赘述。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。
为此,本申请实施例提供一种计算机可读存储介质,其中存储有多条计算机程序,该计算机程序能够被处理器进行加载,以执行本申请实施例所提供的任一种视角切换方法中的步骤。例如,该计算机程序可以执行如下步骤:
在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,根据第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据第一移动参数控制虚拟相机在所处竖直平面移动;
响应于对视角控件的状态切换操作,切换视角控件处于第二操控模式;
在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,根据第二移动操作获取虚拟相机在虚拟场景的景深方向上的第二移动参数,根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。
计算机程序还被配置为执行:
获取第一移动操作的第一操作移动距离和第一操作移动方向;
根据第一操作移动距离和第一操作移动方向,确定虚拟相机在所处竖直平面的第一相机移动方向和第一相机移动距离。
计算机程序还被配置为执行:
确定第二移动操作当前在默认区域内的第一触控点;
确定第一触控点与视角控件的默认区域内第一参考点之间的第二操作移动距离,以及从第一参考点至第一触控点的第二操作移动方向;
根据第二操作移动距离和第二操作移动方向确定虚拟相机在虚拟场景的景深方向上的第二移动参数。
计算机程序还被配置为执行:
根据第二操作移动距离确定虚拟相机在虚拟场景的景深方向上的第二相机移动距离;
根据第二操作移动方向与相机前后移动方向的预设映射关系,将第二操作移动方向映射为虚拟相机虚拟场景的景深方向上的第二相机移动方向,其中,若第二相机移动方向与虚拟相机的拍摄方向相反,则虚拟相机按照第二相机移动距离向后移动,若第二相机移动 方向与虚拟相机的拍摄方向相同,则虚拟相机按照第二相机移动距离向前移动。
计算机程序还被配置为执行:
响应于对视角控件的在预设时长内的至少两次按下操作,则将视角控件的第一操控模式切换为第二操控模式。
计算机程序还被配置为执行:
在视角控件处于第一操控模式或者第二操控模式下,响应于对视角控件的旋转参数输入操作,根据旋转参数输入操作对应的相机旋转参数控制虚拟相机在虚拟场景中旋转。
计算机程序还被配置为执行:
根据第三移动操作在默认区域外的移动方向确定虚拟相机在虚拟场景中的旋转方向;
获取第三移动操作在默认区域外初始的第二触控点和当前的第三触控点;
确定在旋转方向上默认区域内的第二参考点到第二触控点的连线与到第三触控点的连线的夹角,根据夹角确定虚拟相机在虚拟场景中的旋转角度;
根据旋转方向和旋转角度控制虚拟相机在虚拟场景中旋转。
计算机程序还被配置为执行:
第三移动操作在第二触控点处的移动方向,与状态切换操作的初始触控点和结束触控点的连线之间的角度,满足预设角度条件时,第三移动操作有效。
本申请实施例中,在视角控件处于第一操控模式下,响应于在视角控件的默认区域中的第一移动操作,根据第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据第一移动参数控制虚拟相机在所处竖直平面移动;响应于对视角控件的状态切换操作,切换视角控件处于第二操控模式;在视角控件处于第二操控模式下,响应于针对视角控件的默认区域中的第二移动操作,根据第二移动操作获取虚拟相机在虚拟场景的景深方向上的第二移动参数,根据第二移动参数控制虚拟相机在虚拟场景的景深方向上移动。从而实现通过一个视角控件实现不同的操控模式,从而呈现出虚拟场景的不同视角的画面,提高了视角控制的效率。
其中,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。
由于该存储介质中所存储的计算机程序,可以执行本申请实施例所提供的任一种视角切换方法中的步骤,因此,可以实现本申请实施例所提供的任一种视角切换方法所能实现的有益效果,详见前面的实施例,在此不再赘述。
以上对本申请实施例所提供的一种视角切换方法、装置、计算机设备及计算机可读存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (15)

  1. 一种视角切换方法,通过计算机设备提供图形用户界面,所述图形用户界面中包括虚拟相机对虚拟场景进行实时拍摄得到的画面,以及显示在所述画面上的视角控件,所述视角控件被配置为具有至少两个操控模式,所述方法包括:
    在所述视角控件处于第一操控模式下,响应于在所述视角控件的默认区域中的第一移动操作,根据所述第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据所述第一移动参数控制所述虚拟相机在所处竖直平面移动;
    响应于对所述视角控件的状态切换操作,切换所述视角控件处于第二操控模式;
    在所述视角控件处于所述第二操控模式下,响应于针对所述视角控件的默认区域中的第二移动操作,根据所述第二移动操作获取所述虚拟相机在所述虚拟场景的景深方向上的第二移动参数,根据所述第二移动参数控制所述虚拟相机在所述虚拟场景的景深方向上移动。
  2. 根据权利要求1所述的视角切换方法,其中,所述第一移动参数包括第一相机移动方向和第一相机移动距离,所述根据所述第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,包括:
    获取所述第一移动操作的第一操作移动距离和第一操作移动方向;
    根据所述第一操作移动距离和所述第一操作移动方向,确定所述虚拟相机在所处竖直平面的第一相机移动距离和第一相机移动方向。
  3. 根据权利要求1所述的视角切换方法,其中,所述根据所述第二移动操作获取所述虚拟相机在所述虚拟场景的景深方向上的第二移动参数,包括:
    确定所述第二移动操作当前在所述默认区域内的第一触控点;
    确定所述第一触控点与所述视角控件的默认区域内第一参考点之间的第二操作移动距离,以及从所述第一参考点至所述第一触控点的第二操作移动方向;
    根据所述第二操作移动距离和所述第二操作移动方向确定所述虚拟相机在虚拟场景的景深方向上的第二移动参数。
  4. 根据权利要求3所述的视角切换方法,其中,所述第二移动参数包括第二相机移动方向和第二相机移动距离,所述根据所述第二操作移动距离和所述第二操作移动方向确定所述虚拟相机在虚拟场景的景深方向上的第二移动参数,包括:
    根据所述第二操作移动距离确定所述虚拟相机在所述虚拟场景的景深方向上的第二相机移动距离;
    根据第二操作移动方向与相机前后移动方向的预设映射关系,将所述第二操作移动方向映射为所述虚拟相机虚拟场景的景深方向上的第二相机移动方向,其中,若所述第二相机移动方向与所述虚拟相机的拍摄方向相反,则所述虚拟相机按照所述第二相机移动距离向后移动,若所述第二相机移动方向与所述虚拟相机的拍摄方向相同,则所述虚拟相机按照所述第二相机移动距离向前移动。
  5. 根据权利要求3所述的视角切换方法,其中,所述第一参考点包括:所述默认区域的预设位置点,或者,所述第二移动操作在所述默认区域内的初始触控点。
  6. 根据权权利要求1所述的视角切换方法,其中,所述第二移动操作和所述状态切换操作连续。
  7. 根据权利要求1-6任一项所述的视角切换方法,其中,所述响应于对所述视角控件的状态切换操作,切换所述视角控件处于第二操控模式,包括:
    响应于对所述视角控件的在预设时长内的至少两次按下操作,则将所述视角控件的第一操控模式切换为所述第二操控模式。
  8. 根据权利要求1-6任一项所述的视角切换方法,其中,所述方法还包括:
    在所述视角控件处于所述第一操控模式或者第二操控模式下,响应于对所述视角控件 的旋转参数输入操作,根据所述旋转参数输入操作对应的相机旋转参数控制所述虚拟相机在所述虚拟场景中旋转。
  9. 根据权利要求8所述的视角切换方法,其中,所述旋转参数输入操作包括在所述默认区域外的第三移动操作,所述相机旋转参数包括旋转方向和旋转角度,所述根据所述旋转参数输入操作对应的相机旋转参数控制所述虚拟相机在所述虚拟场景中旋转,包括:
    根据所述第三移动操作在所述默认区域外的移动方向确定所述虚拟相机在所述虚拟场景中的旋转方向;
    获取所述第三移动操作在所述默认区域外初始的第二触控点和当前的第三触控点;
    确定在所述旋转方向上所述默认区域内的第二参考点到所述第二触控点的连线与到所述第三触控点的连线的夹角,根据所述夹角确定所述虚拟相机在所述虚拟场景中的旋转角度;
    根据所述旋转方向和旋转角度控制所述虚拟相机在所述虚拟场景中旋转。
  10. 根据权利要求9所述的视角切换方法,其中,所述第三移动操作与所述状态切换操作连续。
  11. 根据权利要求10所述的视角切换方法,其中,所述第二参考点包括:所述默认区域的预设位置点,或者,所述状态切换操作的初始触控点。
  12. 根据权利要求10所述的视角切换方法,其中,所述第三移动操作在所述第二触控点处的移动方向,与所述状态切换操作的初始触控点和结束触控点的连线之间的角度,满足预设角度条件时,所述第三移动操作有效。
  13. 一种视角切换装置,通过计算机设备提供图形用户界面,所述图形用户界面中包括虚拟相机对虚拟场景进行实时拍摄得到的画面,以及显示在所述画面上的视角控件,所述视角控件被配置为具有至少两个操控模式,所述装置包括:
    第一控制模块,被配置为执行在所述视角控件处于第一操控模式下,响应于在所述视角控件的默认区域中的第一移动操作,根据所述第一移动操作获取虚拟相机在所处竖直平面上的第一移动参数,根据所述第一移动参数控制所述虚拟相机在所处竖直平面移动;
    模式切换模块,被配置为执行响应于对所述视角控件的状态切换操作,切换所述视角控件处于第二操控模式;
    第二控制模块,被配置为执行在所述视角控件处于所述第二操控模式下,响应于针对所述视角控件的默认区域中的第二移动操作,根据所述第二移动操作获取所述虚拟相机在所述虚拟场景的景深方向上的第二移动参数,根据所述第二移动参数控制所述虚拟相机在所述虚拟场景的景深方向上移动。
  14. 一种计算机设备,包括:
    存储有可执行程序代码的存储器、与所述存储器耦合的处理器;
    所述处理器调用所述存储器中存储的所述可执行程序代码,执行如权利要求1至12任一项所述的视角切换方法。
  15. 一种计算机可读存储介质,所述存储介质存储有多条指令,所述指令适于处理器进行加载,以执行权利要求1至12任一项所述的视角切换方法。
PCT/CN2024/097262 2023-06-05 2024-06-04 视角切换方法、装置、计算机设备及计算机可读存储介质 Ceased WO2024251109A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310660392.3A CN116585700A (zh) 2023-06-05 2023-06-05 视角切换方法、装置、计算机设备及计算机可读存储介质
CN202310660392.3 2023-06-05

Publications (1)

Publication Number Publication Date
WO2024251109A1 true WO2024251109A1 (zh) 2024-12-12

Family

ID=87607928

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/097262 Ceased WO2024251109A1 (zh) 2023-06-05 2024-06-04 视角切换方法、装置、计算机设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN116585700A (zh)
WO (1) WO2024251109A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116585700A (zh) * 2023-06-05 2023-08-15 网易(杭州)网络有限公司 视角切换方法、装置、计算机设备及计算机可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190118078A1 (en) * 2017-10-23 2019-04-25 Netease (Hangzhou) Network Co.,Ltd. Information Processing Method and Apparatus, Storage Medium, and Electronic Device
CN110141855A (zh) * 2019-05-24 2019-08-20 网易(杭州)网络有限公司 视角控制方法、装置、存储介质及电子设备
CN110573997A (zh) * 2017-04-25 2019-12-13 微软技术许可有限责任公司 基于容器的虚拟相机旋转
CN116099195A (zh) * 2023-02-01 2023-05-12 网易(杭州)网络有限公司 一种游戏的显示控制方法、装置、电子设备及存储介质
CN116115998A (zh) * 2023-02-09 2023-05-16 网易(杭州)网络有限公司 游戏中视角的调整方法、装置、电子设备及可读存储介质
CN116585700A (zh) * 2023-06-05 2023-08-15 网易(杭州)网络有限公司 视角切换方法、装置、计算机设备及计算机可读存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7267753B2 (ja) * 2019-01-21 2023-05-02 キヤノン株式会社 制御装置、制御方法、及びプログラム
CN110193195A (zh) * 2019-04-22 2019-09-03 网易(杭州)网络有限公司 游戏视角控制方法及装置
CN111603758A (zh) * 2020-05-28 2020-09-01 网易(杭州)网络有限公司 一种游戏角色的视角调节方法、电子设备及存储介质
CN113398565B (zh) * 2021-07-15 2024-02-13 网易(杭州)网络有限公司 游戏控制的方法、装置、终端和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110573997A (zh) * 2017-04-25 2019-12-13 微软技术许可有限责任公司 基于容器的虚拟相机旋转
US20190118078A1 (en) * 2017-10-23 2019-04-25 Netease (Hangzhou) Network Co.,Ltd. Information Processing Method and Apparatus, Storage Medium, and Electronic Device
CN110141855A (zh) * 2019-05-24 2019-08-20 网易(杭州)网络有限公司 视角控制方法、装置、存储介质及电子设备
CN116099195A (zh) * 2023-02-01 2023-05-12 网易(杭州)网络有限公司 一种游戏的显示控制方法、装置、电子设备及存储介质
CN116115998A (zh) * 2023-02-09 2023-05-16 网易(杭州)网络有限公司 游戏中视角的调整方法、装置、电子设备及可读存储介质
CN116585700A (zh) * 2023-06-05 2023-08-15 网易(杭州)网络有限公司 视角切换方法、装置、计算机设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN116585700A (zh) 2023-08-15

Similar Documents

Publication Publication Date Title
CN110471596B (zh) 一种分屏切换方法、装置、存储介质及电子设备
TWI785258B (zh) 人臉影像處理方法、裝置及儲存介質
EP3585037B1 (en) Image capturing method and terminal
CN111601065A (zh) 视频通话控制方法、装置及电子设备
JP2020530631A (ja) インタラクション位置決定方法、システム、記憶媒体、およびスマートデバイス
CN108391053A (zh) 一种拍摄控制方法及终端
CN113413594B (zh) 虚拟角色的虚拟拍照方法、装置、存储介质及计算机设备
WO2021115479A1 (zh) 显示控制方法及电子设备
WO2021104227A1 (zh) 拍照方法及电子设备
CN108495032A (zh) 图像处理方法、装置、存储介质及电子设备
CN111966254B (zh) 一种图像拍摄方法、装置、存储介质及终端
CN110519512A (zh) 一种对象处理方法及终端
CN113546419A (zh) 游戏地图显示方法、装置、终端及存储介质
CN115814405A (zh) 游戏中的录像方法、装置、电子设备及存储介质
CN108984075B (zh) 显示模式切换方法、装置及终端
WO2021104162A1 (zh) 显示方法及电子设备
CN116585700A (zh) 视角切换方法、装置、计算机设备及计算机可读存储介质
CN108111750A (zh) 一种变焦调节方法及移动终端
CN114733193A (zh) 游戏控制方法、游戏控制装置及存储介质
CN111432155A (zh) 视频通话方法、电子设备及计算机可读存储介质
WO2024152504A1 (zh) 一种游戏交互方法、装置、计算机设备及存储介质
WO2023221929A1 (zh) 画面显示方法、装置、电子设备及存储介质
CN113426115B (zh) 游戏角色的展示方法、装置和终端
WO2023246296A1 (zh) 自动变焦方法、装置、自拍器及存储介质
CN110996003B (zh) 一种拍照定位方法、装置及移动终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24818641

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE