CN110559653A - control method, device, terminal and storage medium of virtual aircraft - Google Patents

control method, device, terminal and storage medium of virtual aircraft Download PDF

Info

Publication number
CN110559653A
CN110559653A CN201910865786.6A CN201910865786A CN110559653A CN 110559653 A CN110559653 A CN 110559653A CN 201910865786 A CN201910865786 A CN 201910865786A CN 110559653 A CN110559653 A CN 110559653A
Authority
CN
China
Prior art keywords
virtual aircraft
virtual
real
altitude
aircraft
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.)
Granted
Application number
CN201910865786.6A
Other languages
Chinese (zh)
Other versions
CN110559653B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910865786.6A priority Critical patent/CN110559653B/en
Publication of CN110559653A publication Critical patent/CN110559653A/en
Application granted granted Critical
Publication of CN110559653B publication Critical patent/CN110559653B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/20Input arrangements for video game devices
    • A63F13/24Constructional details thereof, e.g. game controllers with detachable joystick handles
    • 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
    • A63F13/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • A63F13/577Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game using determination of contact between game characters or objects, e.g. to avoid collision between virtual racing cars
    • 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/80Special adaptations for executing a specific game genre or game mode
    • A63F13/837Shooting of targets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04815Interaction with a metaphor-based environment or interaction object displayed as three-dimensional, e.g. changing the user viewpoint with respect to the environment or object
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/01Indexing scheme relating to G06F3/01
    • G06F2203/012Walk-in-place systems for allowing a user to walk in a virtual environment while constraining him to a given position in the physical environment

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a control method, a control device, control equipment and a storage medium of a virtual aircraft, and belongs to the technical field of computers and the Internet. The method comprises the following steps: displaying a user interface; acquiring the real-time relative height of the virtual aircraft; and controlling the real-time relative altitude of the virtual aircraft to fly according to the target relative altitude in the process of flying the virtual aircraft in the virtual environment. According to the technical scheme, the real-time relative height of the virtual aircraft is obtained, in the flying process of the virtual aircraft, the real-time relative height of the virtual aircraft is controlled to fly according to the target relative height, self-adaptive height adjustment of the virtual aircraft is achieved, a user does not need to manually adjust the flying height of the virtual aircraft in order to avoid the virtual aircraft from colliding with a barrier, operation is simplified, and the operation requirement on the user is lowered.

Description

Control method, device, terminal and storage medium of virtual aircraft
Technical Field
The embodiment of the application relates to the technical field of computers and internet, in particular to a control method, a control device, a control terminal and a storage medium for a virtual aircraft.
background
At present, with the gradual enrichment of the content and functions of games, virtual aircrafts with flight functions appear in the games.
in the related art, a user interface of a game application includes a joystick operation control and a height adjustment operation control; the rocker operation control is used for controlling the movement of the virtual aircraft in the horizontal direction, and comprises control in all horizontal directions such as front, back, left and right; the height adjustment operation control is used for controlling the movement of the virtual aircraft in the vertical direction and comprises control in the upper direction and the lower direction. And if the user does not adjust the flying height of the virtual aircraft through the height adjusting operation control, the virtual aircraft keeps the current flying height for flying.
However, in the solutions provided by the above-mentioned related arts, since the user needs to control six directions, such as up, down, left, right, front, and back, when controlling the virtual aircraft to fly, the operation is complicated and inconvenient.
Disclosure of Invention
The embodiment of the application provides a control method, a control device, a control terminal and a storage medium for a virtual aircraft, which can be used for solving the technical problem that the operation is complex and inconvenient when the virtual aircraft is controlled to fly in the related technology. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a method for controlling a virtual aircraft, where the method includes:
Displaying a user interface, wherein the user interface comprises a virtual aircraft positioned in a virtual environment;
acquiring real-time relative height of the virtual aircraft, wherein the real-time relative height refers to real-time distance between the virtual aircraft and a virtual object right below the virtual aircraft;
And controlling the real-time relative altitude of the virtual aircraft to fly according to the target relative altitude in the process of flying the virtual aircraft in the virtual environment.
In another aspect, an embodiment of the present application provides a control apparatus for a virtual aircraft, where the apparatus includes:
the interface display module is used for displaying a user interface, and the user interface comprises a virtual aircraft positioned in a virtual environment;
The altitude acquisition module is used for acquiring the real-time relative altitude of the virtual aircraft, wherein the real-time relative altitude refers to the real-time distance between the virtual aircraft and a virtual object right below the virtual aircraft;
And the flight control module is used for controlling the real-time relative altitude of the virtual aircraft to fly according to the target relative altitude in the process that the virtual aircraft flies in the virtual environment.
In yet another aspect, an embodiment of the present application provides a terminal, where the terminal includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the above control method for the virtual aircraft.
In yet another aspect, the present application provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set, or a set of instructions is stored, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the above control method for a virtual aircraft.
In a further aspect, a computer program product is provided, which, when run on a terminal, causes the terminal to execute the above-mentioned method of controlling a virtual aircraft.
according to the technical scheme, the real-time relative height of the virtual aircraft is obtained, in the flying process of the virtual aircraft, the real-time relative height of the virtual aircraft is controlled to fly according to the target relative height, self-adaptive height adjustment of the virtual aircraft is achieved, a user does not need to manually adjust the flying height of the virtual aircraft in order to avoid the virtual aircraft from colliding with a barrier, operation is simplified, and the operation requirement on the user is lowered.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic illustration of an implementation environment provided by one embodiment of the present application;
fig. 2 is a schematic structural diagram of a terminal according to an embodiment of the present application;
FIG. 3 is a flow chart of a method for controlling a virtual aircraft provided by an embodiment of the present application;
FIG. 4 illustrates a schematic view of a user interface of a virtual aircraft;
FIG. 5 illustrates a schematic view of a user interface of another virtual aircraft;
FIG. 6 is a schematic diagram illustrating a vertical force situation of a virtual aircraft;
FIG. 7 illustrates a schematic diagram of a change in velocity of a virtual aircraft;
FIG. 8 illustrates a schematic view of a change in altitude of a virtual aircraft;
FIG. 9 is a flow chart of a method for controlling a virtual aircraft provided in another embodiment of the present application;
FIG. 10 illustrates a schematic view of a user interface of yet another virtual aircraft;
FIG. 11 illustrates a flow chart of a method of controlling a virtual aircraft;
FIG. 12 is a block diagram of a control device for a virtual aircraft provided in one embodiment of the present application;
FIG. 13 is a block diagram of a control device for a virtual aircraft provided in another embodiment of the present application;
Fig. 14 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, a schematic diagram of an implementation environment provided by an embodiment of the present application is shown. The implementation environment may include: a terminal 10 and a server 20.
The terminal 10 may be a portable electronic device such as a mobile phone, a tablet Computer, a game console, an electronic book reader, a multimedia player, a wearable device, a PC (Personal Computer), and the like. A client of an application, such as a game application, may be installed in the terminal 10.
In the embodiment of the present application, the application may be any application capable of providing a virtual environment in which a virtual character substituted and operated by a user performs an activity. Typically, the application is a Game application, such as a BR (Battle royal, large escape and survival) Game, a TPS (Third-person Shooting Game), an FPS (First-person Shooting Game), a MOBA (Multiplayer Online Battle Arena) Game, a Multiplayer gunfight type survival Game, and the like. Of course, in addition to game applications, other types of applications may present virtual objects to a user and provide corresponding functionality to the virtual objects. For example, VR (Virtual Reality) application, AR (Augmented Reality) application, three-dimensional map program, military simulation program, social application, interactive entertainment application, and the like, which are not limited in this embodiment of the present invention. In addition, for different applications, the forms of the virtual objects provided by the applications may also be different, and the corresponding functions may also be different, which may be configured in advance according to actual requirements, and this is not limited in the embodiments of the present application.
The virtual environment is a scene displayed (or provided) by a client of an application program (such as a game application program) when the client runs on a terminal, and the virtual environment refers to a scene created for a virtual object to perform an activity (such as a game competition), such as a virtual house, a virtual island, a virtual map, and the like. The virtual environment may be a simulation environment of a real world, a semi-simulation semi-fictional environment, or a pure fictional environment. The virtual environment may be a two-dimensional virtual environment, a 2.5-dimensional virtual environment, or a three-dimensional virtual environment, which is not limited in this embodiment of the present application. Alternatively, in a 3D virtual environment, there are 3D coordinate axes including an X axis, a Y axis, and a Z axis. The X axis and the Y axis are parallel to a horizontal plane in the virtual environment, the Z axis is vertical to the horizontal plane in the virtual environment, and an included angle between any two of the X axis, the Y axis and the Z axis is a right angle.
the virtual object refers to a virtual role controlled by the user account in the application program. Taking an application as a game application as an example, the virtual object refers to a game character controlled by a user account in the game application. The virtual object may be in the form of a character, an animal, a cartoon or other forms, which is not limited in this application. The virtual object may be displayed in a three-dimensional form or a two-dimensional form, which is not limited in the embodiment of the present application. Optionally, when the virtual environment is a three-dimensional virtual environment, the virtual object is a three-dimensional stereo model created based on an animated skeleton technique. Each virtual object has its own shape and volume in the three-dimensional virtual environment, occupying a portion of the space in the three-dimensional virtual environment.
The server 20 is used to provide background services for clients of applications in the terminal 10. For example, the server 20 may be a backend server for the application described above. The server 20 may be a server, a server cluster composed of a plurality of servers, or a cloud computing service center. Optionally, the server 20 provides background services for applications in multiple terminals 10 simultaneously.
The terminal 10 and the server 20 can communicate with each other through the network 30. The network 30 may be a wired network or a wireless network.
In the embodiment of the method of the present application, the execution subject of each step may be a terminal, such as a client of the above application program running in the terminal. In some embodiments, the application is an application developed based on a three-dimensional virtual environment engine, for example, the virtual environment engine is a Unity engine, and the virtual environment engine can construct a three-dimensional virtual environment, a virtual object, a virtual prop, and the like, so as to bring a more immersive game experience to the user.
please refer to fig. 2, which illustrates a schematic structural diagram of a terminal according to an embodiment of the present application. The terminal 10 may include: a main board 110, an external input/output device 120, a memory 130, an external interface 140, a touch system 150, and a power supply 160.
The main board 110 has integrated therein processing elements such as a processor and a controller.
Alternatively, for a mobile terminal, the external input/output device 120 may include a display component (e.g., a display screen), a sound playing component (e.g., a speaker), a sound collecting component (e.g., a microphone), various keys, and the like; for a PC terminal, the external input/output device 120 may include a display component (e.g., a display screen), a sound playing component (e.g., a speaker), a sound collecting component (e.g., a microphone), various keys (e.g., a mouse and a keyboard), and the like.
the memory 130 has program codes and data stored therein.
The external interface 140 may include a headset interface, a charging interface, a data interface, and the like.
The touch system 150 may be integrated into a display component or a key of the external input/output device 120, and the touch system 150 is used to detect a touch operation performed by a user on the display component or the key.
The power supply 160 is used to power various other components in the terminal 10.
In this embodiment, the processor in the motherboard 110 may generate a user interface (e.g., a game interface) by executing or calling the program codes and data stored in the memory, and display the generated user interface (e.g., the game interface) through the external input/output device 120. In the process of presenting a user interface (e.g., a game interface), a touch operation performed when a user interacts with the user interface (e.g., the game interface) may be detected by the touch system 150 and responded to.
Referring to fig. 3, a flowchart of a method for controlling a virtual aircraft according to an embodiment of the present application is shown. The method is applicable to the terminal 10 implementing the environment shown in fig. 1, and the execution subject of each step may be a client (hereinafter, simply referred to as "client") of an application installed in the terminal 10. The method comprises the following steps (301-303):
Step 301, displaying a user interface, wherein the user interface comprises a virtual aircraft located in a virtual environment.
Taking a shooting-type game application as an example, the user interface may be a display interface of a game pair, and the user interface is used for presenting a virtual environment of the game pair to a user, for example, the user interface may include elements in the virtual environment, such as a virtual building, a virtual prop, a virtual object, and the like. Optionally, the user interface further includes some operation controls, such as buttons, sliders, icons, and the like, for the user to operate.
in an embodiment of the present application, a virtual aircraft located in a virtual environment is included in the user interface. The virtual aircraft refers to a prop used for assisting a virtual object to fly, such as a virtual airplane, a virtual helicopter and the like. The client can control the virtual aircraft to fly away from the ground of the virtual environment, and can control the virtual aircraft to perform some necessary flight performances such as take-off, ascending, descending, landing and the like according to different operation signals. Optionally, the user interface includes some operation controls, such as buttons, sliders, icons, and the like, so that the user can send an operation signal to the client to control the flight performance of the virtual aircraft by using the operation controls. In addition, the virtual aircraft can also be used as a carrier, and a user can control the virtual object to enter the virtual aircraft and fly with the virtual object by the virtual aircraft.
Illustratively, with reference to FIG. 4 in conjunction, the user interface is described with the example of the virtual aircraft being a virtual helicopter. In the user interface 40, a virtual aircraft 41, a stick operation control 42, an up button 43, and a down button 44 are displayed. Wherein, the user controls the flight direction of the virtual aircraft on the horizontal plane by clicking the rocker operation control 42; the user controls the flying height of the virtual aircraft in the vertical direction, which is a direction perpendicular to the horizontal plane, by clicking the up button 43 or the down button 44.
step 302, obtain the real-time relative altitude of the virtual aircraft.
Relative altitude refers to the distance between the virtual aircraft and the virtual object directly below it, which may be any object present in the virtual environment, such as the ground, roof, water surface, boxes, etc. Real-time relative altitude refers to the real-time distance between the virtual aircraft and the virtual object directly below it. Optionally, the above-mentioned relative height is a distance between a centroid of the virtual aircraft and an upper surface of the virtual article directly below the centroid, wherein the centroid of the virtual aircraft refers to a center of mass of the virtual aircraft, that is, a force-receiving center of gravity of the virtual aircraft. Of course, in some other embodiments, the relative height may also be a distance between the lower surface of the virtual aircraft and the upper surface of the virtual article directly below the virtual aircraft, or the relative height may be determined in other ways, which is not limited in this application.
of course, for a virtual aircraft, there is an absolute altitude in addition to the relative altitude described above. The absolute height is the magnitude of the Z-axis (i.e., the axis perpendicular to the horizontal plane) component of the virtual aircraft in the three-dimensional coordinate system in the virtual environment. As shown in fig. 4, the Z-axis may be a coordinate axis opposite to the direction of gravity.
In the embodiment of the application, in the flying process of the virtual aircraft, as the position of the virtual aircraft changes, the virtual article directly below the virtual aircraft also changes continuously, so that the relative height also changes. Optionally, the client determines the real-time relative altitude of the virtual aircraft by ray detection. The ray detection is an interface function provided by the virtual engine, and can make a ray from a certain point to a certain direction, and return the first object touched by the ray and the distance relative to the object to the client. That is, the virtual aircraft may continuously emit the ray to the ground during the flight, and the client detects the real-time relative altitude of the virtual aircraft according to the round-trip time of the ray, for example, if the transmission rate of the ray emitted by the virtual aircraft is 10m/s, and the round-trip time of the ray is 4s, then the real-time relative altitude of the virtual aircraft is 20 m.
It should be noted that, after detecting the real-time relative altitude of the virtual aircraft, the client displays the corresponding real-time relative altitude (e.g., relative altitude 45 in fig. 4) in the user interface. Optionally, the relative altitude on the user interface remains unchanged after the adaptive altitude adjustment by the virtual aircraft. Illustratively, with combined reference to FIG. 5, in the user interface 50, the virtual aircraft 41, the joystick operation control 42, the raise button 43, and the lower button 44 are displayed. During the process that the virtual aircraft 41 flies to the position right above the virtual item 51, the client controls the virtual aircraft 41 to perform the adaptive height adjustment, during which the relative height in the user interface 50 is changed, and after the adaptive height adjustment is completed, the relative height 45 in the user interface 50 is the same as the relative height 45 in fig. 4.
And 303, controlling the real-time relative altitude of the virtual aircraft to fly according to the target relative altitude in the process that the virtual aircraft flies in the virtual environment.
The target relative altitude is a reference value of the real-time relative altitude of the virtual aircraft when the virtual aircraft is subjected to the adaptive altitude adjustment. The self-adaptive height adjustment means that when a user does not adjust the flying height of the virtual aircraft in the vertical direction, the client automatically adjusts the flying height of the virtual aircraft in the vertical direction according to the target relative height so as to ensure that the virtual aircraft does not collide with virtual objects in a virtual environment. The selection of the target relative height in the embodiments of the present application will be described in detail below, and will not be described herein.
optionally, the step 303 includes the following sub-steps:
1. The difference between the real-time relative height and the target relative height is calculated.
optionally, in this embodiment of the application, after determining the target relative altitude of the virtual aircraft, the client detects the real-time relative altitude of the virtual aircraft at certain time intervals, and calculates a difference between the real-time relative altitude and the target relative altitude. The difference value may be obtained by subtracting the target relative altitude from the real-time relative altitude of the virtual aircraft, or may be obtained by subtracting the real-time relative altitude from the target relative altitude of the virtual aircraft, which is not limited in this embodiment of the present application.
Optionally, the time interval is set by the client. It should be noted that the time interval is a time interval between at least two frames of images displayed on the user interface.
2. A first driving force for adaptive altitude adjustment applied to the virtual aircraft is determined based on the difference.
the first driving force is force applied by the client to adjust the flying height of the virtual aircraft during the adaptive height adjustment. Optionally, the direction of the first driving force is along a vertical direction. In a possible embodiment, if the difference is obtained by subtracting the target relative altitude from the real-time relative altitude of the virtual aircraft, if the difference is greater than 0, the direction of the first driving force is the same as the direction of gravity in the virtual environment; if the difference is smaller than 0, the direction of the first driving force is opposite to the direction of gravity in the virtual environment; if the difference is 0, the value of the first driving force is 0. In another possible embodiment, if the difference is obtained by subtracting the real-time relative altitude from the target relative altitude of the virtual aircraft, if the difference is greater than 0, the direction of the first driving force is opposite to the direction of gravity in the virtual environment; if the difference is smaller than 0, the direction of the first driving force is the same as the direction of gravity in the virtual environment; if the difference is 0, the value of the first driving force is 0. It should be noted that the direction of the gravity is perpendicular to the horizontal plane in the virtual environment and is downward.
3. And controlling the virtual aircraft to fly according to the target relative height according to the first driving force.
Optionally, when the virtual aircraft performs altitude adaptive adjustment, the client controls the virtual aircraft to fly according to the target flying altitude by applying a first driving force to the virtual aircraft.
optionally, when the virtual vehicle is subjected to the first driving force, the virtual vehicle is simultaneously subjected to a drag force in the vertical direction. The magnitude of the resistance is in direct proportion to the flight speed of the virtual aircraft in the vertical direction, and the direction of the resistance is opposite to the flight direction of the virtual aircraft in the vertical direction. Illustratively, with combined reference to fig. 6, virtual aircraft 60 is subjected to a first driving force F, which is upward perpendicular to the horizontal plane, and a drag force F, which is downward perpendicular to the horizontal plane, when performing the adaptive altitude adjustment.
Optionally, the client calculates a first acceleration of the virtual aircraft according to the first driving force, the resistance received by the virtual aircraft in the direction perpendicular to the horizontal plane, and the weight of the virtual aircraft, where the first acceleration refers to the moving acceleration of the virtual aircraft in the vertical direction during the adaptive height adjustment; further, calculating the speed of the virtual aircraft at the current time stamp according to the first acceleration, the speed of the virtual aircraft at the last time stamp and the time interval between two adjacent time stamps; then, calculating the real-time relative altitude of the virtual aircraft at the current time stamp according to the speed of the virtual aircraft at the current time stamp, the real-time relative altitude of the virtual aircraft at the last time stamp and the time interval between two adjacent time stamps; and finally, the client controls the virtual aircraft to fly in a user interface corresponding to the current timestamp according to the real-time relative altitude of the current timestamp.
It should be noted that, in this embodiment of the application, for illustration, the previous timestamp is a previous frame, and the current timestamp is a current frame, but in practice, a frame corresponding to the previous timestamp and a frame corresponding to the current timestamp are not necessarily two adjacent frames, that is, a frame corresponding to the previous timestamp and a frame corresponding to the current timestamp may be separated by n frames, where n is a positive integer.
the following describes the parameter calculation of the virtual aircraft during the adaptive altitude adjustment in detail.
When the client performs the self-adaptive height adjustment on the virtual aircraft, the target relative height of the virtual aircraft is assumed to be H0The real-time relative altitude of the virtual aircraft is H, and the current flight speed of the virtual aircraft is v0. When H is present0When the driving force is equal to H, the virtual aircraft does not need to be subjected to height self-adaptive adjustment, and the value of the first driving force is 0; on the contrary, the virtual aircraft needs to be subjected to altitude adaptive adjustment, and the value of the first driving force is not 0.
when the virtual aircraft is H0When the driving force is not equal to H, the client applies a first driving force F to the virtual aircraft1=k(H-H0) If F is1Is greater than 0, the first driving force F1is in the same direction as the direction of gravity in the virtual environment; if F1Is less than 0, the first driving force F1In a direction opposite to the direction of gravity in the virtual environment. Wherein k is a preset constant, and optionally k is-1000N/m.
of course, when the virtual aircraft performs the adaptive altitude adjustment, the virtual aircraft receives the resistance f-bv opposite to the current flight direction0where b is an air resistance coefficient in the virtual environment, and is a constant that can be set in advance. From the above, it can be seen that:
First acceleration a of the virtual aircraft at any time ttComprises the following steps:
Wherein, F1Representing a first driving force to which the virtual aircraft is subjected when performing the adaptive altitude adjustment, f representing a drag in a vertical direction to which the virtual aircraft is subjected when flying, m representing a mass of the virtual aircraft, H0Representing the target relative altitude of the virtual aircraft, H representing the virtual flightReal time relative height of the device, vtrepresenting the velocity of the virtual aircraft at time t.
The velocity v of the virtual aircraft at the above-mentioned time ttComprises the following steps:
wherein v is0Representing the current flying speed of the virtual aircraft.
The relative altitude H of the virtual aircraft at the time ttComprises the following steps:
However, in the calculation process of practical application, due to the limitation of the game frame rate, the client calculates the virtual aircraft parameter of the next frame according to the virtual aircraft parameter of the previous frame, and therefore, the parameter of the virtual aircraft should be a discrete value. In the following, the parameter calculation of the virtual aircraft by the client in practical application will be described in detail.
Assuming that the time interval of each frame of image on the user interface of the client is t, when the client performs self-adaptive height adjustment on the virtual aircraft, assuming that the target relative height of the virtual aircraft is H0The height of the virtual aircraft in the ith frame is Hithe flying speed is vi. When H is presentiAnd H0When the virtual aircraft is not equal to the preset altitude, the virtual aircraft needs to be subjected to altitude self-adaptive adjustment. At this time, the client applies a first driving force F to the virtual aircraft1=k(Hi-H0) If F is1Is greater than 0, the first driving force F1Is in the same direction as the direction of gravity in the virtual environment; if F1Is less than 0, the first driving force F1In a direction opposite to the direction of gravity in the virtual environment. Wherein k is a preset constant, and optionally k is-1000N/m.
Of course, the virtual aircraft is subjected to the adaptive altitude adjustment according to the current situationResistance f-bv in opposite flight directionsiWhere b is an air resistance coefficient in the virtual environment, which may be set in advance. From the above, it can be seen that:
The first acceleration a of the virtual aircraft in the ith frameiComprises the following steps:
Wherein HiRepresenting the altitude, v, of the virtual aircraft in the ith frame of imageiRepresenting the flight speed of the virtual aircraft in the ith frame of image.
The speed v of the virtual aircraft at the (i + 1) th framei+1comprises the following steps:
Wherein v isi+1representing the flight speed of the virtual aircraft in the ith frame of image.
The relative height H of the virtual aircraft in the (i + 1) th framei+1comprises the following steps:
assuming that the target relative altitude of the virtual aircraft is 10m and a virtual article exists 5m ahead, for example, with reference to fig. 7 and 8, and taking b as 1000, m as 1000kg, t as 0.033 as an example, the speed v of the virtual aircraft in the vertical direction is simulatedtand a height HtA change in (c). The horizontal axis in fig. 7 represents the number of image frames for updating the parameter record of the virtual aircraft by the client, and the vertical axis represents the speed v of the virtual aircraft in the vertical directiontAs can be seen intuitively in fig. 7, starting from the 120 th image, the velocity of the virtual aircraft in the vertical direction gradually goes to 0. In fig. 8, the horizontal axis represents the number of image frames for updating the parameter record of the virtual aircraft by the client, and the vertical axis represents the height H of the virtual aircrafttAs can be seen visually in fig. 8, starting from frame 120, the altitude H of the virtual aircrafttGradually approaching the target relative height (10 m). Also locally, the virtual aircraft completes its adaptive altitude adjustment at time 3.96s (120 × 0.033).
To sum up, in the technical scheme provided by the embodiment of the application, by acquiring the real-time relative altitude of the virtual aircraft, in the flying process of the virtual aircraft, the real-time relative altitude of the virtual aircraft is controlled to fly according to the target relative altitude, so that the self-adaptive altitude adjustment of the virtual aircraft is realized, a user does not need to manually adjust the flying altitude of the virtual aircraft in order to avoid the virtual aircraft from colliding with an obstacle, the operation is simplified, and the operation requirement on the user is reduced.
In addition, the virtual aircraft is effectively prevented from colliding with objects in the virtual environment in the flying process through real-time relative height detection and self-adaptive adjustment of the virtual aircraft.
In addition, according to the difference between the real-time relative altitude of the virtual flight and the target relative altitude, the first driving force required by the self-adaptive altitude adjustment is calculated, and the accuracy of the self-adaptive altitude adjustment is guaranteed. The method has the advantages that the flight state of the virtual aircraft is mastered in real time by calculating the parameters of the virtual aircraft at different moments, so that the client can conveniently control the virtual flight when self-adaptive height adjustment is carried out, and the change consistency of the virtual aircraft is ensured. The client displays the real-time relative height of the virtual aircraft on the user interface, so that a user can conveniently master the flight data of the virtual aircraft.
It should be noted that, in the embodiment of the present application, the user may also perform manual altitude adjustment on the virtual aircraft. For example, a user at the end of a mobile phone equipped with a touch screen may adjust the flying height of the virtual aircraft in the vertical direction by clicking a height adjustment button (e.g., an up button 43 or a down button 44 in fig. 4) on the user interface with a finger; for another example, the user at the PC end may adjust the flight height of the virtual aircraft in the vertical direction by clicking a height adjustment button (e.g., an up button 43 or a down button 44 in fig. 4) on the user interface through a mouse, or by pressing a corresponding height adjustment key (e.g., a W key for controlling the up and a S key for controlling the down) on a keyboard, where the above key may be set by the client, or may be set by the user according to the habit of the user, which is not limited in this embodiment of the present application. Optionally, the manual height adjustment is prioritized over the adaptive height adjustment, and the adaptive height adjustment is performed when the manual height adjustment is not detected.
referring to fig. 9, a flowchart of a method for controlling a virtual aircraft according to another embodiment of the present application is shown. The method is applicable to the terminal 10 implementing the environment shown in fig. 1, and the execution subject of each step may be a client (hereinafter, simply referred to as "client") of an application installed in the terminal 10. The method comprises the following steps (901-906):
Step 901, displaying a user interface.
Step 901 is the same as step 301 in the embodiment of fig. 3, and this embodiment of the present application is not described herein again.
At step 902, an altitude adjustment indication corresponding to the virtual aircraft is obtained.
The altitude adjustment instruction refers to an operation instruction for triggering the virtual aircraft to perform altitude adjustment. Optionally, the user interface displays height adjustment controls for the virtual aircraft, such as an up button 43 and a down button 44 in fig. 4. Optionally, the height adjustment indication is generated in a different manner. For example, for a mobile phone end user configured with a touch screen, a corresponding height adjustment control can be clicked by a finger to generate a corresponding height adjustment instruction; for another example, for a PC-end user, the height adjustment control on the user interface may be clicked by a mouse, or a corresponding height adjustment key on a keyboard may be pressed to generate a corresponding height adjustment indication.
In the embodiment of the present application, the user may click or press the height adjustment operation control on the user interface in different manners to trigger generation of the height adjustment indication.
Optionally, the step 902 further includes the following sub-steps:
1. And if a trigger signal corresponding to the ascending operation control in the user interface is received, acquiring an altitude ascending indication corresponding to the virtual aircraft, wherein the altitude ascending indication is used for triggering the ascending of the real-time absolute altitude of the virtual aircraft. Optionally, the user generates the trigger signal of the ascending operation control by clicking or pressing the corresponding skill key.
2. And if a trigger signal corresponding to the descending operation control in the user interface is received, acquiring an altitude downward adjustment indication corresponding to the virtual aircraft, wherein the altitude downward adjustment indication is used for triggering downward adjustment of the real-time absolute altitude of the virtual aircraft. Optionally, the user generates the trigger signal of the descending operation control by clicking or pressing the corresponding skill key.
and the client generates a corresponding height adjustment instruction according to the trigger signal of the operation control.
And step 903, adjusting the real-time absolute height of the virtual aircraft according to the height adjustment instruction.
The real-time absolute altitude refers to the real-time distance between the virtual aircraft and the reference horizontal plane, namely the real-time size of the Z-axis component in the three-dimensional coordinates of the virtual aircraft in the virtual environment. Optionally, after receiving the altitude adjustment instruction, the client may determine the real-time relative altitude of the virtual aircraft that needs to be adjusted according to the number of clicks or presses of the corresponding operation control, for example, each time the user clicks the ascending or descending operation control, the client controls the virtual aircraft to ascend or descend by 100m, 200m, or 300m, and the like; or, the client may also determine the real-time relative altitude of the virtual aircraft that needs to be adjusted according to the click or press duration of the corresponding operation control, for example, each time the user clicks the ascending or descending operation control 1s, the client controls the virtual aircraft to ascend or descend by 100m, 200m, or 300m, and the like.
illustratively, referring to fig. 10 in combination, when the user's finger clicks the ascent button 43 in fig. 4, the flying height of the virtual aircraft 41 changes in the user interface 100 from 12m in fig. 4 to 15m in the relative height 45.
Optionally, the step 903 further includes the following sub-steps:
1. Determining a second driving force for manual altitude adjustment to be applied to the virtual aircraft based on an altitude adjustment indication.
The second driving force is force applied by the client for performing flight height adjustment on the virtual aircraft during manual height adjustment. Optionally, the direction of the second driving force is along a vertical direction and perpendicular to a horizontal plane. Optionally, the direction of the second driving force may be the same as or different from the direction of gravity in the virtual environment, and when the direction of the second driving force is the same as the direction of the gravity, the client controls the virtual aircraft to descend in height; and when the direction of the second driving force is opposite to the gravity direction, the client controls the virtual aircraft to ascend in height.
Optionally, when the virtual vehicle is subjected to the second driving force, the virtual vehicle is simultaneously subjected to a resistance in a direction perpendicular to the horizontal plane. The magnitude of the resistance is in direct proportion to the flight speed of the virtual aircraft in the vertical direction, and the direction of the resistance is opposite to the flight direction of the virtual aircraft in the vertical direction.
2. and calculating a second acceleration of the virtual aircraft according to the second driving force, the resistance of the virtual aircraft in the direction vertical to the horizontal plane and the weight of the virtual aircraft, wherein the second acceleration is the movement acceleration of the virtual aircraft in the vertical direction during manual height adjustment.
3. and calculating the speed of the virtual aircraft at the current time stamp according to the second acceleration, the speed of the virtual aircraft at the last time stamp and the time interval between two adjacent time stamps.
4. And calculating the real-time absolute altitude of the virtual aircraft at the current timestamp according to the speed of the virtual aircraft at the current timestamp, the real-time absolute altitude of the virtual aircraft at the last timestamp and the time interval between the two adjacent timestamps.
5. and controlling the virtual aircraft to fly in a user interface corresponding to the current timestamp according to the real-time absolute altitude of the current timestamp.
It should be noted that, in this embodiment of the application, for illustration, the previous timestamp is a previous frame, and the current timestamp is a current frame, but in practice, a frame corresponding to the previous timestamp and a frame corresponding to the current timestamp are not necessarily two adjacent frames, that is, a frame corresponding to the previous timestamp and a frame corresponding to the current timestamp may be separated by n frames, where n is a positive integer.
And 904, when the altitude adjustment indication disappears, acquiring the real-time relative altitude of the virtual aircraft, and determining the acquired real-time relative altitude as the target relative altitude.
Optionally, in this embodiment of the present application, the real-time relative altitude displayed on the user interface after the user has performed the manual altitude adjustment last time is selected as the target relative altitude when the virtual aircraft performs the adaptive altitude adjustment.
Step 905, obtain the real-time relative altitude of the virtual aircraft.
step 906, controlling the real-time relative altitude of the virtual aircraft to fly according to the target relative altitude in the process that the virtual aircraft flies in the virtual environment.
steps 905 to 906 are the same as steps 302 to 303 in the embodiment of fig. 3, and the embodiment of the present application is not described herein again.
It should be noted that the client updates and records the parameter data of the virtual aircraft on each frame of the user interface. In the following, the parameter calculation of the virtual aircraft is described in detail when manual altitude adjustment is performed.
When the client performs manual height adjustment on the virtual aircraft, the target relative height of the virtual aircraft is assumed to be H0the height of the virtual aircraft in the ith frame is HiThe flying speed is vi. When the client receives the trigger signal of the ascending or descending operation control, a second driving force F is applied to the virtual aircraft2The direction of the second driving force is opposite to or the same as the direction of gravity in the virtual environment.
Of course, when the virtual aircraft is manually adjusted in height, the virtual aircraft is subjected to a drag f ═ bv that is opposite to the current flight directioniAnd b is the air resistance coefficient in the virtual environment. From the above, it can be seen that:
The first acceleration a of the virtual aircraft in the ith frameiComprises the following steps:
Wherein, F2Representing the second driving force to which the virtual aircraft is subjected during manual altitude adjustment, f representing the vertical drag to which the virtual aircraft is subjected during flight, m representing the mass of the virtual aircraft, v representing the mass of the virtual aircraftirepresenting the velocity of the virtual aircraft on the ith frame of image.
The speed v of the virtual aircraft at the (i + 1) th framei+1Comprises the following steps:
vi+1=vi+ait;
Where t denotes a time interval between the ith frame image and the (i + 1) th frame image.
The relative height H of the virtual aircraft in the (i + 1) th framei+1Comprises the following steps:
Hi+1=Hi+vit;
wherein Hi、Hi+1The Z-axis component of the virtual aircraft in the coordinate axis of the virtual environment in the ith frame and the (i + 1) th frame of images respectively.
To sum up, in the technical scheme provided by the embodiment of the application, the real-time absolute height of the virtual aircraft is adjusted when the height adjustment instruction corresponding to the virtual aircraft is obtained, so that the height adjustment manually controlled by a user is realized, and the operation diversity is ensured.
In addition, when the fact that the altitude adjustment indication disappears is detected, the client side obtains the real-time relative altitude of the virtual aircraft as the target relative altitude, seamless connection from manual altitude adjustment to self-adaptive altitude adjustment is achieved, the flying smoothness of the virtual aircraft is guaranteed, and the picture display effect is improved.
In addition, the technical solution of the present application will be described with reference to fig. 11.
And step 111, clicking the height adjusting control by the user to generate ascending or descending input corresponding to the virtual aircraft.
Step 112, if the altitude adjustment instruction exists, the virtual aircraft performs manual altitude adjustment, and the client updates the altitude of the object which is currently opposite to the lower object of the virtual aircraft.
and 113, the user does not click the height adjusting control and does not generate ascending or descending input of the corresponding virtual aircraft.
at step 114, the client determines whether the real-time relative altitude of the virtual aircraft is equal to its target relative altitude.
And step 115, if the real-time relative altitude of the virtual aircraft is equal to the target relative altitude, not applying the first driving force to the virtual aircraft.
And step 116, if the first driving force is not applied, the client displays that the coordinate axis Z of the virtual aircraft in the virtual environment does not displace on the user interface.
And step 117, if the real-time relative altitude of the virtual aircraft is not equal to the target relative altitude, applying a first driving force to the virtual aircraft.
And step 118, displaying the upward or downward displacement of the coordinate axis Z axis of the virtual aircraft in the virtual environment on the user interface by the client according to the first driving force.
Of course, in step 114, the client may not determine whether the real-time relative altitude of the virtual aircraft is equal to the target relative altitude, and determine the first driving force according to the difference between the real-time relative altitude and the target relative altitude of the virtual aircraft, where it should be noted that when the difference is 0, the first driving force is also 0.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
referring to fig. 12, a block diagram of a control device of a virtual aircraft according to an embodiment of the present application is shown. The device has the function of realizing the control method of the virtual aircraft, and the function can be realized by hardware or by hardware executing corresponding software. The device may be a terminal or may be provided in a terminal. The apparatus 1200 may include: an interface display module 1210, an altitude acquisition module 1220, and a flight control module 1230.
An interface display module 1210 for displaying a user interface including a virtual flight in a virtual environment.
The altitude obtaining module 1220 is configured to obtain a real-time relative altitude of the virtual aircraft, where the real-time relative altitude is a real-time distance between the virtual aircraft and a virtual object directly below the virtual aircraft.
And the flight control module 1230 controls the real-time relative altitude of the virtual aircraft to fly according to the target relative altitude in the process that the virtual aircraft flies in the virtual environment.
In an exemplary embodiment, as shown in fig. 13, the flight control module 1230 further includes: a difference value calculation unit 1231, a power determination unit 1232, and a flight control unit 1233.
A difference calculating unit 1231, configured to calculate a difference between the real-time relative height and the target relative height.
A power determination unit 1232 configured to determine a first driving force for adaptive altitude adjustment to be applied to the virtual aircraft according to the difference.
A flight control unit 1233, configured to control the virtual aircraft to fly according to the target relative altitude according to the first driving force.
In an exemplary embodiment, the flight control subunit 1233 is configured to calculate a first acceleration of the virtual aircraft based on the first driving force, a resistance experienced by the virtual aircraft in a direction perpendicular to a horizontal plane, and a weight of the virtual aircraft; calculating the speed of the virtual aircraft at the current timestamp according to the first acceleration, the speed of the virtual aircraft at the last timestamp and the time interval between two adjacent timestamps; calculating the real-time relative altitude of the virtual aircraft at the current time stamp according to the speed of the virtual aircraft at the current time stamp, the real-time relative altitude of the virtual aircraft at the last time stamp and the time interval between the two adjacent time stamps; and controlling the virtual aircraft to fly in a user interface corresponding to the current timestamp according to the real-time relative altitude of the current timestamp.
In an exemplary embodiment, as shown in fig. 13, the apparatus 1200 further comprises: an indication acquisition module 1240 and a height adjustment module 1250.
An indication obtaining module 1240 for obtaining an altitude adjustment indication corresponding to the virtual aircraft.
an altitude adjustment module 1250 configured to adjust a real-time absolute altitude of the virtual aircraft according to the altitude adjustment indication, where the real-time absolute altitude is a real-time distance between the virtual aircraft and a reference horizontal plane.
In an exemplary embodiment, the altitude adjustment module 1250 is further configured to determine a second driving force for manual altitude adjustment to be applied to the virtual aircraft according to the altitude adjustment indication; calculating a second acceleration of the virtual aircraft according to the second driving force, the resistance of the virtual aircraft in the direction vertical to the horizontal plane and the weight of the virtual aircraft; calculating the speed of the virtual aircraft at the current timestamp according to the second acceleration, the speed of the virtual aircraft at the last timestamp and the time interval between two adjacent timestamps; calculating the real-time absolute altitude of the virtual aircraft at the current timestamp according to the speed of the virtual aircraft at the current timestamp, the real-time absolute altitude of the virtual aircraft at the last timestamp and the time interval between the two adjacent timestamps; and controlling the virtual aircraft to fly in a user interface corresponding to the current timestamp according to the real-time absolute altitude of the current timestamp.
In an exemplary embodiment, the indication obtaining module 1240 is configured to obtain an altitude adjustment indication corresponding to the virtual aircraft if a trigger signal corresponding to an ascending operation control in the user interface is received, where the altitude adjustment indication is used to trigger an adjustment of a real-time absolute altitude of the virtual aircraft; and if a trigger signal corresponding to a descending operation control in the user interface is received, acquiring an altitude downward adjustment indication corresponding to the virtual aircraft, wherein the altitude downward adjustment indication is used for triggering downward adjustment of the real-time absolute altitude of the virtual aircraft.
In an exemplary embodiment, as shown in fig. 13, the apparatus 1200 further comprises: a height determination module 1260.
An altitude determining module 1260, configured to, when it is detected that the altitude adjustment indication disappears, obtain a real-time relative altitude of the virtual aircraft, and determine the obtained real-time relative altitude as the target relative altitude.
In an exemplary embodiment, as shown in fig. 13, the apparatus 1200 further comprises: a height display module 1270.
A height display module 1270 for displaying said real-time relative height in said user interface.
to sum up, in the technical scheme provided by the embodiment of the application, by acquiring the real-time relative altitude of the virtual aircraft, in the flying process of the virtual aircraft, the real-time relative altitude of the virtual aircraft is controlled to fly according to the target relative altitude, so that the self-adaptive altitude adjustment of the virtual aircraft is realized, a user does not need to manually adjust the flying altitude of the virtual aircraft in order to avoid the virtual aircraft from colliding with an obstacle, the operation is simplified, and the operation requirement on the user is reduced.
it should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
referring to fig. 14, a block diagram of a terminal 1400 according to an embodiment of the present application is shown. The terminal 1400 may be an electronic device such as a mobile phone, a tablet computer, a game console, an electronic book reader, a multimedia player, a wearable device, a PC, etc. The terminal is used for implementing the control method of the virtual aircraft provided in the above embodiment. The terminal may be the terminal 10 in the implementation environment shown in fig. 1. Specifically, the method comprises the following steps:
In general, terminal 1400 includes: a processor 1401, and a memory 1402.
processor 1401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 1401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1401 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also referred to as a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing content that the display screen needs to display. In some embodiments, processor 1401 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
memory 1402 may include one or more computer-readable storage media, which may be non-transitory. The memory 1302 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1402 is used to store at least one instruction, at least one program, set of codes, or set of instructions configured to be executed by one or more processors to implement the above-described control method for a virtual aircraft.
in some embodiments, terminal 1400 may further optionally include: a peripheral device interface 1403 and at least one peripheral device. The processor 1401, the memory 1402, and the peripheral device interface 1403 may be connected by buses or signal lines. Each peripheral device may be connected to the peripheral device interface 1403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1404, a touch display 1405, a camera 1407, audio circuitry 1407, a positioning component 1408, and a power supply 1409.
those skilled in the art will appreciate that the configuration shown in fig. 14 is not intended to be limiting with respect to terminal 1400 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be employed.
In an exemplary embodiment, there is also provided a computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions which, when executed by a processor, implement the above-described method of controlling a virtual aircraft.
optionally, the computer-readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State drive), or optical disc. The Random Access Memory may include a ReRAM (resistive Random Access Memory) and a DRAM (Dynamic Random Access Memory).
In an exemplary embodiment, a computer program product is also provided, which, when being executed by a processor, is adapted to implement the above-mentioned method of controlling a virtual aircraft.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. In addition, the step numbers described herein only exemplarily show one possible execution sequence among the steps, and in some other embodiments, the steps may also be executed out of the numbering sequence, for example, two steps with different numbers are executed simultaneously, or two steps with different numbers are executed in a reverse order to the order shown in the figure, which is not limited by the embodiment of the present application.
The above description is only exemplary of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like that are made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (15)

1. A method of controlling a virtual aircraft, the method comprising:
Displaying a user interface, wherein the user interface comprises a virtual aircraft positioned in a virtual environment;
Acquiring real-time relative height of the virtual aircraft, wherein the real-time relative height refers to real-time distance between the virtual aircraft and a virtual object right below the virtual aircraft;
And controlling the real-time relative altitude of the virtual aircraft to fly according to the target relative altitude in the process of flying the virtual aircraft in the virtual environment.
2. The method of claim 1, wherein said controlling said real-time relative altitude of said virtual aircraft to fly in accordance with a target relative altitude comprises:
calculating a difference between the real-time relative altitude and the target relative altitude;
determining a first driving force for adaptive altitude adjustment applied to the virtual aircraft according to the difference value;
And controlling the virtual aircraft to fly according to the target relative altitude according to the first driving force.
3. The method of claim 2, wherein said controlling said virtual vehicle to fly at said target relative altitude based on said first driving force comprises:
Calculating a first acceleration of the virtual aircraft according to the first driving force, the resistance of the virtual aircraft in the direction vertical to the horizontal plane and the weight of the virtual aircraft;
Calculating the speed of the virtual aircraft at the current timestamp according to the first acceleration, the speed of the virtual aircraft at the last timestamp and the time interval between two adjacent timestamps;
Calculating the real-time relative altitude of the virtual aircraft at the current time stamp according to the speed of the virtual aircraft at the current time stamp, the real-time relative altitude of the virtual aircraft at the last time stamp and the time interval between the two adjacent time stamps;
And controlling the virtual aircraft to display in a user interface corresponding to the current timestamp according to the real-time relative altitude of the current timestamp.
4. the method of any of claims 1 to 3, wherein after displaying the user interface, further comprising:
Obtaining an altitude adjustment indication corresponding to the virtual aircraft;
And adjusting the real-time absolute height of the virtual aircraft according to the height adjustment indication, wherein the real-time absolute height refers to the real-time distance between the virtual aircraft and a reference horizontal plane.
5. The method of claim 4, wherein said adjusting the real-time absolute altitude of the virtual aircraft in accordance with the altitude adjustment indication comprises:
determining a second driving force for manual altitude adjustment to be applied to the virtual aircraft according to the altitude adjustment indication;
Calculating a second acceleration of the virtual aircraft according to the second driving force, the resistance of the virtual aircraft in the direction vertical to the horizontal plane and the weight of the virtual aircraft;
Calculating the speed of the virtual aircraft at the current timestamp according to the second acceleration, the speed of the virtual aircraft at the last timestamp and the time interval between two adjacent timestamps;
Calculating the real-time absolute altitude of the virtual aircraft at the current timestamp according to the speed of the virtual aircraft at the current timestamp, the real-time absolute altitude of the virtual aircraft at the last timestamp and the time interval between the two adjacent timestamps;
And controlling the virtual aircraft to display in a user interface corresponding to the current timestamp according to the real-time absolute height of the current timestamp.
6. The method of claim 4, wherein the obtaining an altitude adjustment indication corresponding to the virtual aircraft comprises:
If a trigger signal corresponding to a rising operation control in the user interface is received, acquiring an altitude up-regulation indication corresponding to the virtual aircraft, wherein the altitude up-regulation indication is used for triggering the up-regulation of the real-time absolute altitude of the virtual aircraft;
and if a trigger signal corresponding to a descending operation control in the user interface is received, acquiring an altitude downward adjustment indication corresponding to the virtual aircraft, wherein the altitude downward adjustment indication is used for triggering downward adjustment of the real-time absolute altitude of the virtual aircraft.
7. The method of claim 4, wherein after adjusting the real-time absolute altitude of the virtual aircraft in accordance with the altitude adjustment indication, further comprising:
And when the altitude adjustment indication disappears, acquiring the real-time relative altitude of the virtual aircraft, and determining the acquired real-time relative altitude as the target relative altitude.
8. the method of any of claims 1 to 3, wherein after obtaining the real-time relative altitude of the virtual aircraft, further comprising:
Displaying the real-time relative altitude in the user interface.
9. a control apparatus for a virtual aircraft, the apparatus comprising:
The interface display module is used for displaying a user interface, and the user interface comprises a virtual aircraft positioned in a virtual environment;
The altitude acquisition module is used for acquiring the real-time relative altitude of the virtual aircraft, wherein the real-time relative altitude refers to the real-time distance between the virtual aircraft and a virtual object right below the virtual aircraft;
And the flight control module is used for controlling the real-time relative altitude of the virtual aircraft to fly according to the target relative altitude in the process that the virtual aircraft flies in the virtual environment.
10. the apparatus of claim 9, wherein the flight control module further comprises:
A difference calculation unit for calculating a difference between the real-time relative height and the target relative height;
A power determination unit for determining a first driving force for adaptive altitude adjustment to be applied to the virtual aircraft according to the difference value;
And the flight control unit is used for controlling the virtual aircraft to fly according to the target relative height according to the first driving force.
11. The apparatus of claim 10, wherein the flight control unit is to:
calculating a first acceleration of the virtual aircraft according to the first driving force, the resistance of the virtual aircraft in the direction vertical to the horizontal plane and the weight of the virtual aircraft;
Calculating the speed of the virtual aircraft at the current timestamp according to the first acceleration, the speed of the virtual aircraft at the last timestamp and the time interval between two adjacent timestamps;
Calculating the real-time relative altitude of the virtual aircraft at the current time stamp according to the speed of the virtual aircraft at the current time stamp, the real-time relative altitude of the virtual aircraft at the last time stamp and the time interval between the two adjacent time stamps;
and controlling the virtual aircraft to fly in a user interface corresponding to the current timestamp according to the real-time relative altitude of the current timestamp.
12. The apparatus of any one of claims 9 to 11, further comprising:
an indication obtaining module for obtaining an altitude adjustment indication corresponding to the virtual aircraft;
And the height adjusting module is used for adjusting the real-time absolute height of the virtual aircraft according to the height adjusting indication, wherein the real-time absolute height is the real-time distance between the virtual aircraft and a reference horizontal plane.
13. The method of claim 12, wherein the apparatus further comprises:
And the height determining module is used for acquiring the real-time relative height of the virtual aircraft when the height adjustment indication disappears, and determining the acquired real-time relative height as the target relative height.
14. A terminal, characterized in that it comprises a processor and a memory in which at least one instruction, at least one program, a set of codes or a set of instructions is stored, which is loaded and executed by the processor to implement the method of control of a virtual aircraft according to any one of claims 1 to 8.
15. A computer readable storage medium, wherein at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the storage medium, which is loaded and executed by a processor to implement the method of controlling a virtual aircraft according to any one of claims 1 to 8.
CN201910865786.6A 2019-09-12 2019-09-12 Control method, device, terminal and storage medium of virtual aircraft Active CN110559653B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910865786.6A CN110559653B (en) 2019-09-12 2019-09-12 Control method, device, terminal and storage medium of virtual aircraft

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910865786.6A CN110559653B (en) 2019-09-12 2019-09-12 Control method, device, terminal and storage medium of virtual aircraft

Publications (2)

Publication Number Publication Date
CN110559653A true CN110559653A (en) 2019-12-13
CN110559653B CN110559653B (en) 2020-08-11

Family

ID=68779810

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910865786.6A Active CN110559653B (en) 2019-09-12 2019-09-12 Control method, device, terminal and storage medium of virtual aircraft

Country Status (1)

Country Link
CN (1) CN110559653B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111111195A (en) * 2019-12-26 2020-05-08 腾讯科技(深圳)有限公司 Virtual object control method, device, terminal and storage medium
CN111569414A (en) * 2020-06-08 2020-08-25 浙江商汤科技开发有限公司 Flight display method and device of virtual aircraft, electronic equipment and storage medium
CN111650953A (en) * 2020-06-09 2020-09-11 浙江商汤科技开发有限公司 Aircraft obstacle avoidance processing method and device, electronic equipment and storage medium
CN111667584A (en) * 2020-06-09 2020-09-15 福州市极化律网络科技有限公司 Multi-user virtual world exploration method and storage medium
CN111913408A (en) * 2020-08-27 2020-11-10 北京航空航天大学 Simplified flight control simulation method for single-rotor helicopter with tail rotor

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664034A (en) * 2018-05-10 2018-10-16 杭州瓦屋科技有限公司 Imitative ground flying method and device of the plant protection drone in tea place

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664034A (en) * 2018-05-10 2018-10-16 杭州瓦屋科技有限公司 Imitative ground flying method and device of the plant protection drone in tea place

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
AG沉舟: "《bilibili》", 17 August 2019 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111111195A (en) * 2019-12-26 2020-05-08 腾讯科技(深圳)有限公司 Virtual object control method, device, terminal and storage medium
CN111569414A (en) * 2020-06-08 2020-08-25 浙江商汤科技开发有限公司 Flight display method and device of virtual aircraft, electronic equipment and storage medium
CN111569414B (en) * 2020-06-08 2024-03-29 浙江商汤科技开发有限公司 Flight display method and device of virtual aircraft, electronic equipment and storage medium
CN111650953A (en) * 2020-06-09 2020-09-11 浙江商汤科技开发有限公司 Aircraft obstacle avoidance processing method and device, electronic equipment and storage medium
CN111667584A (en) * 2020-06-09 2020-09-15 福州市极化律网络科技有限公司 Multi-user virtual world exploration method and storage medium
CN111667584B (en) * 2020-06-09 2024-02-09 福州市极化律网络科技有限公司 Multi-user virtual world search method and storage medium
CN111650953B (en) * 2020-06-09 2024-04-16 浙江商汤科技开发有限公司 Aircraft obstacle avoidance processing method and device, electronic equipment and storage medium
CN111913408A (en) * 2020-08-27 2020-11-10 北京航空航天大学 Simplified flight control simulation method for single-rotor helicopter with tail rotor

Also Published As

Publication number Publication date
CN110559653B (en) 2020-08-11

Similar Documents

Publication Publication Date Title
CN110559653B (en) Control method, device, terminal and storage medium of virtual aircraft
WO2021022967A1 (en) Virtual object control method and apparatus, terminal, and storage medium
CN110585731B (en) Method, device, terminal and medium for throwing virtual article in virtual environment
EP3970819B1 (en) Interface display method and apparatus, and terminal and storage medium
CN106873767B (en) Operation control method and device for virtual reality application
JP7238143B2 (en) MOVEMENT CONTROL METHOD AND APPARATUS THEREOF, TERMINAL AND COMPUTER PROGRAM FOR VIRTUAL OBJECT
CN113559518A (en) Interaction detection method and device of virtual model, electronic equipment and storage medium
CN111111195A (en) Virtual object control method, device, terminal and storage medium
CN113952720A (en) Game scene rendering method and device, electronic equipment and storage medium
CN112215932A (en) Particle animation processing method, device, storage medium and computer equipment
CN110585711A (en) Control method, device, terminal and storage medium of virtual aircraft
US20230289054A1 (en) Control mode selection to indicate whether simultaneous perspective change and function selection is enabled
CN113426124A (en) Display control method and device in game, storage medium and computer equipment
CN115040870A (en) Virtual item pickup method and device, computer equipment and storage medium
JP2024513744A (en) Methods, devices, equipment and computer programs for marking objects in virtual environments
US20220032188A1 (en) Method for selecting virtual objects, apparatus, terminal and storage medium
CN114089784A (en) Unmanned aerial vehicle control method and system based on MR glasses
CN114053693B (en) Object control method and device in virtual scene and terminal equipment
WO2023221707A1 (en) Virtual vehicle control method and apparatus, and device and storage medium
US11978152B2 (en) Computer-assisted graphical development tools
WO2023246307A1 (en) Information processing method and apparatus in virtual environment, and device and program product
US20230285859A1 (en) Virtual world sound-prompting method, apparatus, device and storage medium
US20240091644A1 (en) Virtual object control method and apparatus, device, and medium
CN115564916A (en) Editing method and device of virtual scene, computer equipment and storage medium
CN117046110A (en) Virtual emission processing method and device, electronic equipment and storage 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40018813

Country of ref document: HK