CN108245890B - Method and device for controlling movement of object in virtual scene - Google Patents

Method and device for controlling movement of object in virtual scene Download PDF

Info

Publication number
CN108245890B
CN108245890B CN201810169066.1A CN201810169066A CN108245890B CN 108245890 B CN108245890 B CN 108245890B CN 201810169066 A CN201810169066 A CN 201810169066A CN 108245890 B CN108245890 B CN 108245890B
Authority
CN
China
Prior art keywords
angle
virtual scene
controlling
target object
rotation
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.)
Active
Application number
CN201810169066.1A
Other languages
Chinese (zh)
Other versions
CN108245890A (en
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
Priority to CN201810169066.1A priority Critical patent/CN108245890B/en
Publication of CN108245890A publication Critical patent/CN108245890A/en
Application granted granted Critical
Publication of CN108245890B publication Critical patent/CN108245890B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • A63F13/428Processing 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 involving motion or position input signals, e.g. signals representing the rotation of an input controller or a player's arm motions sensed by accelerometers or gyroscopes
    • 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/55Controlling game characters or game objects based on the game progress
    • 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/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/8082Virtual reality

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method and a device for controlling the motion of an object in a virtual scene. Wherein, the method comprises the following steps: acquiring a first angle of rotation of a control device, wherein the control device is used for controlling a target object to move in a virtual scene; determining a second angle according to the first angle, wherein the second angle increases along with the increase of the first angle under the condition that the first angle is smaller than a preset angle, and the second angle decreases along with the increase of the first angle under the condition that the first angle is larger than or equal to the preset angle; and controlling the moving speed of the target object in the virtual scene according to the first angle, and controlling the rotating angle of the target object in the virtual scene according to the second angle. The invention solves the technical problem of poor experience caused by the fact that in the prior art, the handle based on the 3Dof controls an object in a linear mode, and only the object can move but not rotate.

Description

Method and device for controlling movement of object in virtual scene
Technical Field
The invention relates to the technical field of software, in particular to a method and a device for controlling the motion of an object in a virtual scene.
Background
VR (Virtual Reality, VR) was proposed by the us VPL company, creation human Lanier (Jaron Lanier) in the beginning of the 20 th century in the 80's. The concrete connotations are as follows: a technique for providing an immersive sensation in an interactive three-dimensional environment generated on a computer by comprehensively utilizing a computer graphics system and various interface devices for reality and control. The three-dimensional computer-generated and interactive Environment is referred to as a Virtual Environment (VE for short). Virtual reality technology is a technology of a computer simulation system that can create and experience a virtual world. It utilizes computer to generate a simulated environment, and utilizes the system simulation of interactive three-dimensional dynamic visual and entity behaviors of multi-source information fusion to immerse the user in the environment.
In the present stage, the VR controller mainly uses a handle with 3 degrees of freedom rotation, namely, a direction angle (Yaw), a Pitch angle (Pitch), and a Roll angle (Roll), as shown in fig. 1. These 3 angles can determine the spatial orientation of the operating handle (i.e., the VR controller). Although each major manufacturer provides an arm simulation model in its own mobile terminal VR development kit to simulate the spatial position of the operating handle when the 3 angles change, these models are simple simulations, and the accurate 6-degree-of-freedom handle position and posture positioning at the PC end (e.g., HTC Vive, PSVR, etc.) cannot be realized, so that a problem arises in this way, how to use one 3-degree-of-freedom handle to interact with an object in a virtual scene, and how to use the handle to drag and rotate an object in various mechanisms, which is a problem to be solved urgently.
Aiming at the problem that in the prior art, the handle based on the 3Dof adopts linear control to control an object, only the movement of the object can be realized, but the rotation cannot be realized, so that the experience is poor, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for controlling the motion of an object in a virtual scene, and at least solves the technical problem that in the prior art, the object is controlled by a handle based on a 3Dof in a linear mode, only the movement of the object can be realized, but the rotation of the object cannot be realized, so that the experience is poor.
According to an aspect of the embodiments of the present invention, there is provided a method for controlling the motion of an object in a virtual scene, including: acquiring a first angle of rotation of a control device, wherein the control device is used for controlling a target object to move in a virtual scene; determining a second angle according to the first angle, wherein the second angle increases along with the increase of the first angle under the condition that the first angle is smaller than a preset angle, and the second angle decreases along with the increase of the first angle under the condition that the first angle is larger than or equal to the preset angle; and controlling the moving speed of the target object in the virtual scene according to the first angle, and controlling the rotating angle of the target object in the virtual scene according to the second angle.
Further, acquiring a first angle of rotation of the control device includes: determining a first orientation of the control device before rotation; and acquiring a second orientation after the control equipment rotates, and determining a first angle according to the second orientation and the first orientation.
Further, the moving speed is proportional to the first angle, and the rotation angle is equal to the second angle.
Further, the second angle is determined by the following formula: arcsin (sin (a) k); wherein a is a first angle, b is a second angle, k is a constant, 0< k < 1.
Furthermore, a is greater than or equal to 0 and less than or equal to 180 degrees, b is greater than or equal to 0 and less than or equal to 90 degrees, and the preset angle is 90 degrees.
Further, movement and/or rotation of the target object in the virtual scene is controlled based on the cubic Bezier curve.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for controlling the motion of an object in a virtual scene, including: the device comprises an acquisition unit, a control unit and a display unit, wherein the acquisition unit is used for acquiring a first angle of rotation of a control device, and the control device is used for controlling a target object to move in a virtual scene; a determining unit, configured to determine a second angle according to the first angle, where the second angle increases with an increase of the first angle when the first angle is smaller than a preset angle, and the second angle decreases with an increase of the first angle when the first angle is greater than or equal to the preset angle; and the control unit is used for controlling the moving speed of the target object in the virtual scene according to the first angle and controlling the rotating angle of the target object in the virtual scene according to the second angle.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, where the storage medium includes a stored program, and when the program runs, a device in which the storage medium is controlled to execute the method for controlling the motion of an object in a virtual scene in any one of the above method embodiments.
According to another aspect of the embodiments of the present invention, there is further provided a processor, configured to execute a program, where the program executes the method for controlling the motion of the object in the virtual scene in any one of the above method embodiments.
According to an embodiment of the present invention, there is also provided a terminal including: one or more processors, memory, a display device, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the method of controlling motion of an object in a virtual scene of any of the above method embodiments.
In the embodiment of the invention, a first angle of rotation of a control device is obtained, wherein the control device is used for controlling a target object to move in a virtual scene; determining a second angle according to the first angle, wherein the second angle increases along with the increase of the first angle under the condition that the first angle is smaller than a preset angle, and the second angle decreases along with the increase of the first angle under the condition that the first angle is larger than or equal to the preset angle; the moving speed of the target object in the virtual scene is controlled according to the first angle, the rotating angle of the target object in the virtual scene is controlled according to the second angle, the purposes that the object in the three-dimensional virtual scene is controlled to move or rotate through the control equipment and the moving curve of the object is simulated more truly are achieved, the technical effect that the user experience of the user immersed in the three-dimensional virtual scene is improved is achieved, and the technical problem that in the prior art, the object can only be moved but cannot be rotated due to the fact that the user can not experience well is solved because the handle based on the 3Dof controls the object in a straight line mode.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of an alternative 3 degree of freedom handle controller for controlling an object according to the prior art;
FIG. 2 is a flow diagram of a method for controlling motion of objects in a virtual scene according to an embodiment of the invention;
FIG. 3 is a flow diagram of an alternative method for controlling motion of objects in a virtual scene, in accordance with embodiments of the present invention;
FIG. 4 is a schematic illustration of an alternative cubic Bezier curve according to the prior art;
FIG. 5 is a schematic diagram of an alternative cubic Bezier curve according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an alternative control of object movement through cubic Bezier curves according to embodiments of the present application;
fig. 7 is a schematic diagram of an apparatus for controlling the motion of an object in a virtual scene according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for controlling the movement of objects in a virtual scene, it being noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different than here.
Fig. 2 is a flowchart of a method for controlling the movement of an object in a virtual scene according to an embodiment of the present invention, as shown in fig. 2, the method includes the following steps:
step S202, a first angle of rotation of a control device is obtained, wherein the control device is used for controlling the target object to move in the virtual scene.
As an alternative embodiment, the target object may be a virtual object to be controlled in a three-dimensional virtual scene (e.g., a VR game scene), including but not limited to characters of various game characters, flyers, and the like; the control device includes, but is not limited to, an interactive device in a VR game (e.g., a helmet, a three-dimensional mouse, glasses, a bracelet, a handle, etc.), and optionally, an interactive device in an AR game. The first angle may be an angle that the control device rotates when the user controls the target object in the virtual scene to move through the control device.
And S204, determining a second angle according to the first angle, wherein the second angle is increased along with the increase of the first angle under the condition that the first angle is smaller than the preset angle, and the second angle is decreased along with the increase of the first angle under the condition that the first angle is larger than or equal to the preset angle.
Specifically, the second angle may be an angle obtained according to a first angle by which the control device is rotated, wherein the second angle increases as the first angle increases when the first angle is smaller than a preset angle; when the first angle is larger than or equal to the preset angle, the second angle is reduced along with the increase of the first angle.
In an optional embodiment, a may be greater than or equal to 0 and less than or equal to 180 degrees, b may be greater than or equal to 0 and less than or equal to 90 degrees, and the preset angle may be 90 degrees. It can be seen that the first angle can be an acute angle or an obtuse angle, while the second angle is always an acute angle, and when the first angle is an acute angle, the second angle increases with the increase of the first angle; when the first angle is an obtuse angle, the second angle decreases as the first angle increases.
In step S206, the moving speed of the target object in the virtual scene is controlled according to the first angle, and the rotation angle of the target object in the virtual scene is controlled according to the second angle.
Specifically, after a first angle of a control device for controlling the target object is acquired, the moving speed of the target object in the three-dimensional virtual scene is controlled according to the first angle, the rotating angle of the target object in the three-dimensional virtual scene is controlled according to a second angle, and the second angle is always an acute angle and is reduced along with the increase of the first angle, so that the whole curve can be kept in a shape similar to a curved fishing rod instead of a curve in a large arch shape, and the curve simulating the dragged object looks more powerful.
As can be seen from the above, in the above implementation of the present application, the angle (i.e. the first angle) by which the control device for controlling the interaction with the target object in the three-dimensional virtual scene is rotated controls the moving speed of the target object in the three-dimensional virtual scene, and the second angle determined according to the first angle controls the rotating angle of the target object in the three-dimensional virtual scene, and it is easy to note that, in the case that the first angle is smaller than the preset angle, the second angle increases with the increase of the first angle; when the first angle is larger than the preset angle, the second angle is reduced along with the increase of the first angle, the purposes of moving or rotating the object in the three-dimensional virtual scene and simulating the moving curve of the object more truly are achieved through the control equipment, the technical effect of improving the user experience of the user immersed in the three-dimensional virtual scene is achieved, and further the technical problems that in the prior art, the handle based on the 3Dof adopts linear control for controlling the object, the moving of the object can only be achieved, the rotation cannot be achieved, and the experience is poor are solved.
In an alternative embodiment, as shown in fig. 3, obtaining the first angle of rotation of the control device may include the steps of:
step S302, determining a first orientation before the control equipment rotates;
step S304, acquiring a second orientation after the control device rotates, and determining a first angle according to the second orientation and the first orientation.
In particular, in the above-described embodiment, when the user controls the movement of the object in the three-dimensional virtual scene through the control device, the target object to be moved is first selected, and determines the position (i.e., the first position) of the target object to be moved, which object the user typically controls by means of the control device, which object the control device is directed towards, and, thus, the first orientation of the control device before controlling the movement of the target object may be determined based on a first position of the target object in the three-dimensional virtual scene, when the user controls the target object to move through the control equipment, the target object can rotate by a certain angle through the control equipment, from the orientation (i.e., the second orientation) at which the control apparatus stops rotating, the angle of rotation during the entire process in which the control apparatus controls the movement of the target object can be determined, i.e. a first angle, in order to determine the direction or distance in which an object in the three-dimensional virtual scene moves, depending on the first angle.
Alternatively, as an alternative embodiment, the moving speed of the target object in the three-dimensional virtual scene may be proportional to the first angle, and the target object rotates by an angle equal to the second angle during the moving process in the three-dimensional virtual scene.
In accordance with any of the above alternative embodiments, the motion curve of the target object may conform to a cubic Bezier curve.
It is easy to note that when interacting with objects in the three-dimensional virtual scene through the control device, the movement of the objects in the three-dimensional scene is determined from the azimuth information of the handle controller by acquiring the azimuth information of the handle controller in space. The object has six degrees of freedom in space, namely, the degree of freedom of movement along the directions of three orthogonal coordinate axes of x, y and z and the degree of freedom of rotation around the three coordinate axes. The motion of the target object in the virtual scene not only comprises the movement towards all directions, but also comprises the rotation of the target object, the existing control equipment interacting with the three-dimensional virtual scene generally adopts a handle controller with 3 degrees of freedom, the control of the object in the three-dimensional virtual scene is controlled by using a straight line, the straight line is dragged, the object is very stiff, the dragging strength can not be embodied, and only the object is simply moved, but the rotation can not be realized. As an optional implementation mode, the method can use a 3-order Bezier curve to simulate a dragging curve, endow the curve with elasticity, and embody the dragging force sense. The movement and the rotation speed of the object are dynamically controlled according to the angle of the Bezier curve, so that a player can visually find the power of dragging the object by himself.
The following is a brief description of a Bezier curve, which is a mathematical curve applied to a two-dimensional graphics application, wherein a 3-step Bezier curve is a smooth curve drawn according to coordinates of any point at four locations. The four points P0, P1, P2, P3 define cubic Bezier curves in a plane or in three-dimensional space. The curve starts from P0 to P1 and goes from the direction of P2 to P3. Generally does not pass through P1 or P2; these two points only provide directional information there. The spacing between P0 and P1 determines how long the curve "goes" in length "in the direction of P2 before turning to P3. The parametric form of the 3 rd order Bezier curve can be represented by equation (1):
B(t)=P0(1-t)3+3P1t(1-t)2+3P2t2(1-t)+P3t3,t∈[0,1] (1)
the idea of using a 3-order Bezier curve in the present application is as follows: taking a point P0 as a point where a handle is located, taking a point P3 as a point where an object needing to be controlled is located, taking a point P1 as a point calculated according to the orientation of the handle, calculating an angle b according to an included angle a between a vector P0- > P3 and a vector P0- > P1, and obtaining a rotating angle b of the vector P3- > P0, and obtaining 3-order Bezier curves with different shapes by adjusting the corresponding relation of the angles a and b and the vector lengths P0- > P1, P3- > P2, so that the displayed curves are simulated better, the curves are endowed with elasticity, and better strength and strength feeling are obtained. It is easy to note that the lengths of the P0- > P1 and P3- > P2 vectors can be set in a self-defined mode, and a user can adjust the lengths to the best effect according to needs.
It is easy to note that in controlling the movement (movement and/or rotation) of a target object in a three-dimensional virtual scene based on a 3 rd order Bezier curve (which simulates the drag curve of a dragged target object), the above-mentioned angles a and b cannot be in a simple proportional or inverse relationship, because when a increases an obtuse angle from an acute angle with dragging, b also becomes an obtuse angle if a and b are in a simple proportional or inverse relationship, and the curve is drawn in the shape as shown in fig. 4.
As an alternative embodiment, the present application defines the magnitude relationship between the first angle and the second angle as the relationship shown in formula (2):
b=Arcsin(Sin(a)*k); (2)
wherein a is a first angle, b is a second angle, k is a constant, 0< k < 1.
Specifically, after the first angle of the control device in the space is acquired, the corresponding second angle can be calculated by the above equation (2). Since sin (a) is greater than 0 when the first angle is in the range of 0 ≦ a ≦ 180 degrees, b (i.e., the second angle) calculated by arcsin will ensure that the clock is at an acute angle and will decrease with increasing angle a after the angle a has changed to an obtuse angle, so that the entire curve will remain in a curved rod-like shape, as shown in fig. 5, rather than a curve with a large arch shape as shown in fig. 4.
It is apparent from the curves shown in fig. 4 and 5 that the dragging force amount presented in fig. 5 is more sufficient.
Based on the above embodiment, in order to implement the movement and rotation of the object in the three-dimensional virtual scene, in a specific implementation process, a ray may be emitted from the position of the handle in a direction of the handle, the ray hits a hit body of the object, then the object is selected by pressing a button on the handle, and then the object starts to be dragged, and the following process is performed: as shown in fig. 6, with P0 as the point of the handle, P3 as the point of the controlled object, and the vector P0- > P1 as the orientation of the handle, it can be seen from the contents shown in fig. 4 and 5 that the angle P1P0P3 (i.e. the first angle) changes with the change of the orientation of the handle, so it changes between 0 and 180 degrees, the angle P0P3P2 (i.e. the second angle) is always acute, and when the angle P1P0P3 (i.e. the first angle) is acute, the angle P0P3P2 (i.e. the second angle) increases with the increase of the angle P1P0P3 (i.e. the first angle); when the angle P1P0P3 (i.e., the first angle) is an obtuse angle, the angle P0P3P2 (i.e., the second angle) decreases with an increase in the angle P1P0P3, so that two variation types of angles are obtained, which can be respectively used to manipulate different movements of the object.
When the target object in the three-dimensional virtual scene is controlled to move, since the angle P1P0P3 changes along with the handle, and the angle P1P0P3 is larger and larger as the handle is rotated by the hand by a larger angle, the angle can be used to control the movement of the object, the simplest is that the object moves with a speed proportional to the angle, and assuming that the angle value of the angle P1P0P3 is a, the moving speed of the object can be expressed as: v ═ a × k, (k is a constant, and ranges from 0< k < 1). It is easy to note that the moving direction of the target object is variable according to the requirement, and in the case where the target object can move freely, the direction of the vector P3- > P2 can be directly used as the moving direction of the target object. If the target object has a fixed track, i.e. a fixed moving direction, then the target object can be moved along the set moving direction by determining the angle between the projection v, v of the vector P3- > P2 on the plane (the plane parallel to the moving direction and perpendicular to the straight line P0- > P3) and the moving direction of the target object is smaller than a certain value.
In order to solve the problem that the object does not change its position when rotating unlike the movement of the control target object when the target object moves in the three-dimensional virtual scene, if the rotation angle is controlled by using an angle that is always increased as the angle P1P0P3 is increased, the object still rotates as the angle P1P0P3 is increased when the handle moves to the rear, that is, the angle P1P0P is an obtuse angle, and in order to solve the problem, the object is controlled by using the angle P0P3P2, the angle P0P3P2 is increased from 0, the angle P0P3P2 is increased as the angle P1P0P3 is increased when the angle P1P0P3 is an acute angle, and the angle P0P3P2 is decreased as the angle P1P0P3 is increased, and the object rotation angle is also decreased when the angle P1P0P3 is an obtuse angle.
Through the embodiment of the application, the movement and the rotation of the object are controlled by using different angles of the Bezier curve, so that the movement and the rotation of the object can be more consistent with the cognition of people, and the reality is more realized. The 3-order Bezier curve is used for simulating a dragging curve, elasticity is given to the curve, the curve looks more powerful and voluminous, and immersion of a player in VR can be improved.
According to an embodiment of the present invention, there is further provided an apparatus embodiment for implementing the method for controlling the motion of an object in a virtual scene, and fig. 7 is a schematic diagram of an apparatus for controlling the motion of an object in a virtual scene according to an embodiment of the present invention, as shown in fig. 7, the apparatus includes: an acquisition unit 701, a determination unit 703, and a control unit 705.
The acquiring unit 701 is configured to acquire a first angle of rotation of a control device, where the control device is configured to control a target object to move in a virtual scene;
a determining unit 703 configured to determine a second angle according to the first angle, where the second angle increases with an increase of the first angle when the first angle is smaller than a preset angle, and the second angle decreases with an increase of the first angle when the first angle is greater than or equal to the preset angle;
a control unit 705 for controlling a moving speed of the target object moving in the virtual scene according to the first angle and controlling a rotation angle of the target object rotating in the virtual scene according to the second angle.
It should be noted here that the above-mentioned acquiring unit 701, determining unit 703 and control unit 705 correspond to steps S202 to S206 in the method embodiment, and the above-mentioned modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above-mentioned method embodiment. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
As can be seen from the above, in the above implementation of the present application, the angle (i.e. the first angle) by which the control device for controlling the interaction with the target object in the three-dimensional virtual scene is rotated controls the moving speed of the target object in the three-dimensional virtual scene, and the second angle determined according to the first angle controls the rotating angle of the target object in the three-dimensional virtual scene, and it is easy to note that, in the case that the first angle is smaller than the preset angle, the second angle increases with the increase of the first angle; when the first angle is larger than the preset angle, the second angle is reduced along with the increase of the first angle, the purposes of moving or rotating the object in the three-dimensional virtual scene and simulating the moving curve of the object more truly are achieved through the control equipment, the technical effect of improving the user experience of the user immersed in the three-dimensional virtual scene is achieved, and further the technical problems that in the prior art, the handle based on the 3Dof adopts linear control for controlling the object, the moving of the object can only be achieved, the rotation cannot be achieved, and the experience is poor are solved.
In an alternative embodiment, the obtaining unit may include: the first determining module is used for determining a first orientation before the control equipment rotates; and the second determining module is used for acquiring a second orientation after the control equipment rotates and determining the first angle according to the second orientation and the first orientation.
In an alternative embodiment, the speed of movement is proportional to the first angle and the angle of rotation is equal to the second angle.
In an alternative embodiment, the determining unit is further configured to determine the second angle by the following formula: arcsin (sin (a) k); wherein a is a first angle, b is a second angle, k is a constant, 0< k < 1.
In an optional embodiment, a is greater than or equal to 0 and less than or equal to 180 degrees, b is greater than or equal to 0 and less than or equal to 90 degrees, and the preset angle is 90 degrees.
In an alternative embodiment, the moving and/or rotating of the target object in the virtual scene is controlled based on a cubic Bezier curve.
According to an embodiment of the present invention, there is further provided a storage medium, where the storage medium includes a stored program, where when the program runs, the apparatus on which the storage medium is controlled to execute any one of the optional or preferred methods for controlling motion of an object in a virtual scene in the above method embodiments.
According to an embodiment of the present invention, there is further provided a processor, configured to execute a program, where the program executes any one of the optional or preferred methods for controlling the motion of an object in a virtual scene in the above method embodiments.
According to an embodiment of the present invention, there is also provided a terminal including: one or more processors, a memory, a display device, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing any one of the optional or preferred methods of the above method embodiments for controlling motion of an object in a virtual scene.
The application provides an use Bezier curve control object rotation and removal method in VR, utilize the speed that first angle control object removed, utilize the angle that second angle control object turned to, wherein, first angle is along with the increase of handle pivoted angle and bigger, the second angle is when being in the acute angle, along with the increase of handle pivoted angle and bigger, when being in the obtuse angle, along with the increase of handle pivoted angle and smaller, thereby simulate the curve that shows better, give curve elasticity, thereby obtain better strength sense.
The above-mentioned apparatus may comprise a processor and a memory, and the above-mentioned units may be stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to implement the corresponding functions.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The order of the embodiments of the present application described above does not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments. In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways.
The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method of controlling motion of an object in a virtual scene, comprising:
acquiring a first angle of rotation of a control device, wherein the control device is used for controlling a target object to move in a virtual scene;
determining a second angle according to the first angle, wherein the second angle increases with the increase of the first angle when the first angle is smaller than a preset angle, and the second angle decreases with the increase of the first angle when the first angle is larger than or equal to the preset angle;
and controlling the moving speed of the target object in the virtual scene according to the first angle, and controlling the rotation angle of the target object in the virtual scene according to the second angle.
2. The method of claim 1, wherein obtaining a first angle of control device rotation comprises:
determining a first orientation of the control device before rotation;
and acquiring a second orientation after the control equipment rotates, and determining the first angle according to the second orientation and the first orientation.
3. The method of claim 1, wherein the speed of movement is proportional to the first angle and the angle of rotation is equal to the second angle.
4. The method of claim 1, wherein the second angle is determined by the formula:
b=Arcsin(Sin(a)*k);
wherein a is a first angle, b is a second angle, k is a constant, 0< k < 1.
5. The method according to claim 4, wherein the first angle is in a range of 0 ≦ a ≦ 180 degrees, the second angle is in a range of 0 ≦ b ≦ 90 degrees, and the predetermined angle is 90 degrees.
6. The method according to any of the claims 1 to 5, characterized in that the movement and/or rotation of the target object in the virtual scene is controlled based on a cubic Bezier curve.
7. An apparatus for controlling motion of an object in a virtual scene, comprising:
the device comprises an acquisition unit, a control unit and a display unit, wherein the acquisition unit is used for acquiring a first angle of rotation of a control device, and the control device is used for controlling a target object to move in a virtual scene;
a determining unit, configured to determine a second angle according to the first angle, where the second angle increases with an increase of the first angle when the first angle is smaller than a preset angle, and the second angle decreases with an increase of the first angle when the first angle is greater than or equal to the preset angle;
and the control unit is used for controlling the moving speed of the target object in the virtual scene according to the first angle and controlling the rotating angle of the target object in the virtual scene according to the second angle.
8. A storage medium comprising a stored program, wherein the program, when executed, controls an apparatus on which the storage medium is located to perform the method of controlling motion of an object in a virtual scene of any one of claims 1 to 7.
9. A processor configured to execute a program, wherein the program is configured to execute the method for controlling the motion of an object in a virtual scene according to any one of claims 1 to 7.
10. A terminal, comprising:
one or more processors, memory, a display device, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the method of controlling motion of an object in a virtual scene of any of claims 1-7.
CN201810169066.1A 2018-02-28 2018-02-28 Method and device for controlling movement of object in virtual scene Active CN108245890B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810169066.1A CN108245890B (en) 2018-02-28 2018-02-28 Method and device for controlling movement of object in virtual scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810169066.1A CN108245890B (en) 2018-02-28 2018-02-28 Method and device for controlling movement of object in virtual scene

Publications (2)

Publication Number Publication Date
CN108245890A CN108245890A (en) 2018-07-06
CN108245890B true CN108245890B (en) 2021-04-27

Family

ID=62745630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810169066.1A Active CN108245890B (en) 2018-02-28 2018-02-28 Method and device for controlling movement of object in virtual scene

Country Status (1)

Country Link
CN (1) CN108245890B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109200580A (en) * 2018-07-17 2019-01-15 派视觉虚拟现实(深圳)软件技术有限公司 A kind of method, device and equipment that control game role moves at a distance
CN109542222B (en) * 2018-11-13 2021-12-14 深圳市创凯智能股份有限公司 Three-dimensional visual angle control method, device and equipment and readable storage medium
CN109847349A (en) * 2019-02-19 2019-06-07 网易(杭州)网络有限公司 Technical ability method for releasing, device and storage medium in game
US11380037B2 (en) 2019-10-30 2022-07-05 Tencent Technology (Shenzhen) Company Limited Method and apparatus for generating virtual operating object, storage medium, and electronic device
CN110755847B (en) * 2019-10-30 2021-03-16 腾讯科技(深圳)有限公司 Virtual operation object generation method and device, storage medium and electronic device
CN112328154B (en) * 2020-11-11 2022-08-30 维沃移动通信有限公司 Equipment control method and device and electronic equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060040740A1 (en) * 2004-08-23 2006-02-23 Brain Box Concepts, Inc. Video game controller
CN102226880A (en) * 2011-06-03 2011-10-26 北京新岸线网络技术有限公司 Somatosensory operation method and system based on virtual reality
CN104090465A (en) * 2014-06-17 2014-10-08 福建水立方三维数字科技有限公司 Three-dimensional interactive projection imaging method
CN105359054A (en) * 2013-06-10 2016-02-24 微软技术许可有限责任公司 Locating and orienting device in space
CN106095103A (en) * 2016-06-16 2016-11-09 世源科技工程有限公司 The display control method of virtual reality, device and relevant device
CN106293070A (en) * 2016-07-27 2017-01-04 网易(杭州)网络有限公司 Virtual role view directions control method and device
CN106873767A (en) * 2016-12-30 2017-06-20 深圳超多维科技有限公司 The progress control method and device of a kind of virtual reality applications
CN106911891A (en) * 2017-02-15 2017-06-30 惠州Tcl移动通信有限公司 The method and system that a kind of VR auxiliary is taken photo by plane
CN107045389A (en) * 2017-04-14 2017-08-15 腾讯科技(深圳)有限公司 A kind of method and device for realizing the fixed controlled thing of control
CN107198879A (en) * 2017-04-20 2017-09-26 网易(杭州)网络有限公司 Control method for movement, device and terminal device in virtual reality scenario
CN107247512A (en) * 2017-05-05 2017-10-13 北京凌宇智控科技有限公司 A kind of rotating direction control method, apparatus and system
CN107577345A (en) * 2017-09-04 2018-01-12 苏州英诺迈医学创新服务有限公司 A kind of method and device for controlling virtual portrait roaming

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060040740A1 (en) * 2004-08-23 2006-02-23 Brain Box Concepts, Inc. Video game controller
CN102226880A (en) * 2011-06-03 2011-10-26 北京新岸线网络技术有限公司 Somatosensory operation method and system based on virtual reality
CN105359054A (en) * 2013-06-10 2016-02-24 微软技术许可有限责任公司 Locating and orienting device in space
CN104090465A (en) * 2014-06-17 2014-10-08 福建水立方三维数字科技有限公司 Three-dimensional interactive projection imaging method
CN106095103A (en) * 2016-06-16 2016-11-09 世源科技工程有限公司 The display control method of virtual reality, device and relevant device
CN106293070A (en) * 2016-07-27 2017-01-04 网易(杭州)网络有限公司 Virtual role view directions control method and device
CN106873767A (en) * 2016-12-30 2017-06-20 深圳超多维科技有限公司 The progress control method and device of a kind of virtual reality applications
CN106911891A (en) * 2017-02-15 2017-06-30 惠州Tcl移动通信有限公司 The method and system that a kind of VR auxiliary is taken photo by plane
CN107045389A (en) * 2017-04-14 2017-08-15 腾讯科技(深圳)有限公司 A kind of method and device for realizing the fixed controlled thing of control
CN107198879A (en) * 2017-04-20 2017-09-26 网易(杭州)网络有限公司 Control method for movement, device and terminal device in virtual reality scenario
CN107247512A (en) * 2017-05-05 2017-10-13 北京凌宇智控科技有限公司 A kind of rotating direction control method, apparatus and system
CN107577345A (en) * 2017-09-04 2018-01-12 苏州英诺迈医学创新服务有限公司 A kind of method and device for controlling virtual portrait roaming

Also Published As

Publication number Publication date
CN108245890A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
CN108245890B (en) Method and device for controlling movement of object in virtual scene
US10481689B1 (en) Motion capture glove
US8154544B1 (en) User specified contact deformations for computer graphics
LaViola et al. 3D spatial interaction: applications for art, design, and science
US8648864B2 (en) System and method for blended animation enabling an animated character to aim at any arbitrary point in a virtual space
EP2880636B1 (en) Constraint evaluation in directed acyclic graphs
CN111167120A (en) Method and device for processing virtual model in game
Qian et al. Virtual reality based laparoscopic surgery simulation
JP7238143B2 (en) MOVEMENT CONTROL METHOD AND APPARATUS THEREOF, TERMINAL AND COMPUTER PROGRAM FOR VIRTUAL OBJECT
Petersik et al. Realistic haptic interaction in volume sculpting for surgery simulation
CN111508080B (en) Method for realizing adhesive tape winding simulation based on UE4 engine and related equipment
Vilanova et al. VirEn: A virtual endoscopy system
CN115253294A (en) Game role hairstyle adjusting method and device, electronic equipment and storage medium
CN111047675A (en) Method and device for simulating hair
US20230377268A1 (en) Method and apparatus for multiple dimension image creation
Teleb et al. Data glove integration with 3d virtual environments
JP2004062676A (en) Program, recording medium, three-dimensional character group controlling method and game machine
JP2009020874A (en) Hair simulation method, and device therefor
Teng et al. Image-based tree modeling from a few images with very narrow viewing range
Kamuro et al. 3D Haptic modeling system using ungrounded pen-shaped kinesthetic display
Csongei et al. ClonAR: Rapid redesign of real-world objects
JPH06236432A (en) Virtual-reality system and generation method of virtual-reality world of virtual-reality image
Kageyama et al. IMMERSIVE VR VISUALIZATIONS BY VFIVE PART 1: DEVELOPMENT
Piekarski et al. Tinmith-mobile outdoor augmented reality modelling demonstration
JP2017199284A (en) Program, information processor, influence degree derivation method, image generation method and recording medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant