Carrier control method and device, storage medium and electronic device

文档序号:1512404 发布日期:2020-02-11 浏览:32次 中文

阅读说明:本技术 载具控制方法和装置、存储介质及电子装置 (Carrier control method and device, storage medium and electronic device ) 是由 杨槿 于 2019-10-28 设计创作,主要内容包括:本发明公开了一种载具控制方法和装置、存储介质及电子装置。其中,该方法包括:在游戏客户端控制目标虚拟角色运行一局游戏任务的过程中,获取目标虚拟角色的运动状态;在运动状态指示目标虚拟角色正在乘坐目标载具移动,且目标载具处于自动行驶状态的情况下,获取目标载具当前的目标行驶速度;在目标行驶速度位于为目标载具配置的目标速度区间的情况下,控制目标载具保持自动行驶状态,其中,目标速度区间用于触发对自动行驶状态的切换控制。本发明解决了需要用户手动完成载具的行驶模式的切换操作,导致载具控制操作复杂度较高的技术问题。(The invention discloses a carrier control method and device, a storage medium and an electronic device. Wherein, the method comprises the following steps: the method comprises the steps that in the process that a game client controls a target virtual character to run a game task, the motion state of the target virtual character is obtained; under the condition that the motion state indicates that the target virtual character moves by taking the target carrier and the target carrier is in an automatic running state, acquiring the current target running speed of the target carrier; and controlling the target vehicle to keep an automatic driving state under the condition that the target driving speed is in a target speed interval configured for the target vehicle, wherein the target speed interval is used for triggering switching control of the automatic driving state. The invention solves the technical problem of higher complexity of the control operation of the carrier caused by the fact that the user needs to manually complete the switching operation of the driving mode of the carrier.)

1. A vehicle control method, comprising:

the method comprises the steps that in the process that a game client controls a target virtual character to run a game task, the motion state of the target virtual character is obtained;

acquiring the current target running speed of the target vehicle under the condition that the motion state indicates that the target virtual character is moving by taking the target vehicle and the target vehicle is in an automatic running state;

and controlling the target vehicle to keep the automatic driving state under the condition that the target driving speed is in a target speed interval configured for the target vehicle, wherein the target speed interval is used for triggering switching control of the automatic driving state.

2. The method of claim 1, wherein, in the case that the motion state indicates that the target avatar is moving with a target vehicle and the target vehicle is in an automatic driving state, acquiring a current target driving speed of the target vehicle comprises:

acquiring a speed adjusting instruction triggered by executing human-computer interaction operation in the game client, wherein the speed adjusting instruction is used for indicating to adjust the target running speed;

responding to the speed adjusting instruction, and adjusting the running speed of the target vehicle to obtain the adjusted running speed;

and taking the adjusted running speed as the acquired target running speed.

3. The method of claim 1, wherein, in the case that the motion state indicates that the target avatar is moving with a target vehicle and the target vehicle is in an automatic driving state, acquiring a current target driving speed of the target vehicle comprises:

determining the prop type of a target prop object under the condition that the target carrier is detected to collide with the target prop object set in the game task;

under the condition that the prop type indicates that the target prop object is an addition prop object, performing acceleration operation on the target vehicle to obtain accelerated running speed serving as the target running speed;

and under the condition that the prop type indicates that the target prop object is a prop object of an obstacle class, executing a deceleration operation on the target vehicle to obtain a decelerated running speed serving as the target running speed.

4. The method of claim 3, wherein the performing a deceleration operation on the target vehicle to obtain a decelerated travel speed comprises:

comparing the obstacle height of the target prop object with the tire radius of the target vehicle;

determining that the target vehicle will not be able to cross the target prop object if the obstacle height is greater than or equal to the tire radius; after performing a deceleration operation on the target vehicle, the decelerated travel speed of the target vehicle will reach zero;

determining that the target vehicle will span the target prop object if the obstacle height is less than the tire radius; and acquiring the decelerated running speed after the target carrier crosses the target prop object.

5. The method according to claim 2 or 3, further comprising, after said obtaining a current target traveling speed of the target vehicle:

controlling the target vehicle to maintain the automatic travel state in a case where it is detected that the target travel speed has increased but is still less than an upper limit speed of the target speed section;

controlling the target vehicle to maintain the automatic travel state in a case where it is detected that the target travel speed has decreased but is still greater than a lower limit speed of the target speed section.

6. The method according to any one of claims 1 to 4, further comprising, after said obtaining a current target travel speed of the target vehicle:

under the condition that the target running speed is detected to be larger than the upper limit speed of the target speed interval, controlling the target vehicle to be switched from the automatic running state to a non-automatic running state;

and controlling the target vehicle to be switched from the automatic driving state to a non-automatic driving state when the target driving speed is detected to be smaller than the lower limit speed of the target speed interval.

7. The method of claim 1, further comprising, prior to said obtaining a current target travel speed of said target vehicle:

detecting a travel speed of the target vehicle if it is determined that an automatic travel mode has been configured for the target vehicle;

determining an operation mode configured for the game task under the condition that the running speed of the target vehicle is detected to be in the target speed interval and the duration time reaches a target threshold value;

displaying prompt information at a position matched with the operation mode in the game client;

and after a confirmation instruction is acquired according to the prompt information, determining that the target vehicle enters the automatic driving state, wherein the confirmation instruction is an instruction triggered by a user object using the game client to execute a confirmation operation.

8. The method of claim 7, wherein displaying the hint information at the location in the game client that matches the operational mode comprises:

under the condition that the operation mode is a key control mode, displaying a first prompt key at a first position matched with the key control mode, wherein after the click operation executed on the first prompt key is detected, the confirmation instruction is generated to determine that the target vehicle enters the automatic driving state;

displaying a prompt track on an operation area matched with the single-rocker control mode under the condition that the operation mode is the single-rocker control mode, wherein after the sliding operation executed by the user object according to the prompt track is detected, the confirmation instruction is generated to determine that the target vehicle enters the automatic driving state;

and under the condition that the operation mode is a rocker key combination control mode, displaying a second prompt key at a second position matched with the rocker key combination control mode, wherein after the click operation executed on the second prompt key is detected, the confirmation instruction is generated, and the target vehicle is determined to enter the automatic driving state.

9. A vehicle control device, comprising:

the game client side is used for controlling the target virtual character to run a game task, and acquiring the motion state of the target virtual character;

the second obtaining unit is used for obtaining the current target running speed of the target vehicle under the condition that the motion state indicates that the target virtual character is moving by taking the target vehicle and the target vehicle is in an automatic running state;

a first control unit, configured to control the target vehicle to maintain the automatic driving state when the target driving speed is within a target speed interval configured for the target vehicle, where the target speed interval is used to trigger switching control of the automatic driving state.

10. The apparatus of claim 9, wherein the second obtaining unit comprises:

the first acquisition module is used for acquiring a speed adjustment instruction triggered by executing human-computer interaction operation in the game client, wherein the speed adjustment instruction is used for indicating to adjust the target running speed;

the adjusting module is used for responding to the speed adjusting instruction and adjusting the running speed of the target carrier to obtain the adjusted running speed;

and the first determination module is used for taking the adjusted running speed as the acquired target running speed.

11. The apparatus of claim 9, wherein the second obtaining unit comprises:

the second determination module is used for determining the prop type of the target prop object under the condition that the target carrier is detected to collide with the target prop object set in the game task;

the first operation module is used for executing acceleration operation on the target vehicle to obtain accelerated running speed serving as the target running speed under the condition that the property type indicates that the target property object is an addition type property object;

and the second operation module is used for executing deceleration operation on the target vehicle to obtain a decelerated running speed as the target running speed under the condition that the prop type indicates that the target prop object is a prop object of an obstacle class.

12. The apparatus of claim 11, wherein the second operation module comprises:

the comparison submodule is used for comparing the obstacle height of the target prop object and the tire radius of the target carrier;

a first determining submodule for determining that the target vehicle will not be able to cross the target prop object if the obstacle height is greater than or equal to the tire radius; after performing a deceleration operation on the target vehicle, the decelerated travel speed of the target vehicle will reach zero;

a second determination submodule to determine that the target vehicle will cross the target prop object if the obstacle height is less than the tire radius; and acquiring the decelerated running speed after the target carrier crosses the target prop object.

13. The apparatus of claim 10 or 11, further comprising:

a second control unit, configured to, after the current target traveling speed of the target vehicle is obtained, control the target vehicle to maintain the automatic traveling state if it is detected that the target traveling speed has increased but is still less than an upper limit speed of the target speed interval;

a third control unit configured to control the target vehicle to maintain the automatic travel state if it is detected that the target travel speed has decreased but is still greater than a lower limit speed of the target speed section.

14. The apparatus of any of claims 9 to 12, further comprising:

a fourth control unit, configured to, after the current target traveling speed of the target vehicle is obtained, control the target vehicle to switch from the automatic traveling state to a non-automatic traveling state when it is detected that the target traveling speed is greater than an upper limit speed of the target speed interval;

a fifth control unit, configured to control the target vehicle to switch from the automatic travel state to a non-automatic travel state when it is detected that the target travel speed is less than a lower limit speed of the target speed section.

15. The apparatus of claim 9, further comprising:

a detection unit, configured to detect a driving speed of the target vehicle if it is determined that an automatic driving mode has been configured for the target vehicle before the current target driving speed of the target vehicle is obtained;

the first determining unit is used for determining an operation mode configured for the game task under the condition that the running speed of the target vehicle is detected to be in the target speed interval and the duration time reaches a target threshold value;

the display unit is used for displaying prompt information at a position matched with the operation mode in the game client;

and the second determining unit is used for determining that the target vehicle enters the automatic driving state after a confirmation instruction is obtained according to the prompt information, wherein the confirmation instruction is an instruction triggered by a user object using the game client to execute a confirmation operation.

16. The apparatus of claim 15, wherein the display unit comprises:

the first display module is used for displaying a first prompt key at a first position matched with the key control mode under the condition that the operation mode is the key control mode, wherein the confirmation instruction is generated after the click operation executed on the first prompt key is detected so as to determine that the target vehicle enters the automatic driving state;

a second display module, configured to display a prompt track on an operation area matched with the single-joystick control mode when the operation mode is the single-joystick control mode, where the confirmation instruction is generated to determine that the target vehicle enters the automatic driving state after a sliding operation performed by the user object according to the prompt track is detected;

and the third display module is used for displaying a second prompt key at a second position matched with the rocker key combination control mode under the condition that the operation mode is the rocker key combination control mode, wherein the confirmation instruction is generated after the click operation executed on the second prompt key is detected, and the target vehicle is determined to enter the automatic driving state.

17. A computer-readable storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 8.

18. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 8 by means of the computer program.

Technical Field

The invention relates to the field of computers, in particular to a carrier control method and device, a storage medium and an electronic device.

Background

In many game scenes, a carrier is often arranged to assist a virtual object controlled by a player to move as quickly as possible in the game scene, so as to shorten the moving time.

In order to facilitate the virtual object to take into account other game operations during the driving process, the vehicle is often switched to an automatic driving mode. However, in the automatic driving control method provided by the related art, when the vehicle accelerates or decelerates due to an obstacle, the vehicle exits from the automatic driving mode, and further, the player needs to frequently switch manually to enter the automatic driving mode again. That is to say, for a vehicle in a game scene, a user is often required to manually complete the switching operation of the driving mode, which causes a problem of high complexity of the vehicle control operation.

In view of the above problems, no effective solution has been proposed.

Disclosure of Invention

The embodiment of the invention provides a carrier control method and device, a storage medium and an electronic device, which at least solve the technical problem that the complexity of carrier control operation is higher because a user needs to manually complete the switching operation of the driving mode of a carrier.

According to an aspect of the embodiments of the present invention, there is provided a vehicle control method, including: the method comprises the steps that in the process that a game client controls a target virtual character to run a game task, the motion state of the target virtual character is obtained; when the motion state indicates that the target virtual character moves by taking a target vehicle and the target vehicle is in an automatic driving state, acquiring the current target driving speed of the target vehicle; and controlling the target vehicle to maintain the automatic driving state when the target driving speed is within a target speed interval configured for the target vehicle, wherein the target speed interval is used for triggering switching control of the automatic driving state.

According to another aspect of the embodiments of the present invention, there is also provided a vehicle control apparatus, including: the game client side is used for controlling the target virtual character to run a game task, and acquiring the motion state of the target virtual character; a second obtaining unit, configured to obtain a current target driving speed of the target vehicle when the motion state indicates that the target virtual character is moving on the target vehicle and the target vehicle is in an automatic driving state; a first control unit, configured to control the target vehicle to maintain the automatic travel state when the target travel speed is within a target speed section configured for the target vehicle, where the target speed section is used to trigger switching control of the automatic travel state.

According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the vehicle control method when running.

According to another aspect of the embodiments of the present invention, there is provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the vehicle control method through the computer program.

In the embodiment of the present invention, through the embodiments provided in the present application, in the process of a game client controlling a target virtual character to run a game task, a motion state of the target virtual character is obtained, and in a case that the motion state indicates that the target virtual character is moving on a target vehicle and the target vehicle is in an automatic running state, a current target running speed of the target vehicle is obtained. And under the condition that the target running speed is in the target speed interval, controlling the target vehicle to keep an automatic running state so as to avoid triggering the target vehicle to exit the automatic running state due to the change of the running speed of the target vehicle, thereby achieving the purpose of speed protection of the target vehicle in the automatic running state, and avoiding the need of repeatedly manually adjusting by a user to recover to the automatic running state again so as to realize the effect of simplifying the vehicle control operation. And then the technical problem that the complexity of the control operation of the carrier is higher because the user needs to manually complete the switching operation of the running mode of the carrier is solved.

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 application environment of an alternative vehicle control method according to an embodiment of the present invention;

fig. 2 is a schematic flow chart of an alternative vehicle control method according to an embodiment of the invention;

fig. 3 is a schematic diagram of an alternative vehicle control method according to an embodiment of the invention;

fig. 4 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention;

fig. 5 is a schematic flow chart of another alternative vehicle control method according to an embodiment of the present invention;

fig. 6 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention;

fig. 7 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention;

fig. 8 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention;

fig. 9 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention;

fig. 10 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention;

fig. 11 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention; fig. 12 is a schematic structural diagram of an alternative vehicle control apparatus according to an embodiment of the present invention;

fig. 13 is a schematic structural diagram of an alternative electronic device according to an embodiment of the 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.

According to an aspect of the embodiments of the present invention, an vehicle control method is provided, optionally, as an optional implementation manner, the vehicle control method may be but not limited to be applied to a vehicle control system in a hardware environment as shown in fig. 1, where the vehicle control system may include but is not limited to a terminal device 102, a network 110, and a server 112. The terminal device 102 runs a game client, and is configured to control a target virtual character to complete a game task in a game scene.

The terminal device 102 may include, but is not limited to: a human-computer interaction screen 104, a processor 106 and a memory 108. The man-machine interaction screen 104 is used for acquiring a man-machine interaction instruction through a man-machine interaction interface and is also used for presenting a game picture in a game task; the processor 106 is used for controlling the target virtual character to execute the specified operation to complete the game task in response to the human-computer interaction instruction. The memory 108 is used for storing the attribute information of the target virtual character and the attribute information of the target vehicle taken by the target virtual character. Here, the server may include but is not limited to: the database 114 and the processing engine 116, wherein the processing engine 116 is configured to call a target speed interval stored in the database 114, compare the target speed interval with a current target traveling speed of a target vehicle, and control the target vehicle to maintain an automatic traveling state when the target traveling speed is determined to be in the target speed interval. The automatic driving state is avoided once the driving speed of the target vehicle changes, so that the user object needs to be frequently manually switched from the manual driving state to the automatic driving state again, and the effect of simplifying the complexity of the control operation of the vehicle is achieved.

The specific process comprises the following steps: an interactive interface of a game client running a game task (as shown in fig. 1, a shooting game is adopted, and a target virtual character snipes a target object at a far position) is displayed on a human-computer interaction screen 104 in the terminal device 102. The motion state of the target virtual character is acquired and transmitted to the server 112 through the network 110 as by steps S102-S112. And when the server 112 determines that the target virtual character takes the target vehicle according to the motion state, acquiring a running mode configured for the target vehicle in the game task, monitoring the running speed of the target vehicle when the adopted running mode is determined to be the automatic running mode, and determining that the target vehicle is in the automatic running state when the running speed of the target vehicle reaches the target speed interval and the duration reaches the target threshold. And then returns the determined result to the terminal device 102.

Then, in the case where the target vehicle is determined to be in the automatic traveling state, the terminal device 102 obtains the current target traveling speed of the target vehicle as in steps S114 to S116. And under the condition that the target running speed is within the target speed interval, controlling the target vehicle to keep an automatic running state so as to avoid triggering the target vehicle to exit the automatic running state due to the change of the running speed of the target vehicle, thereby achieving the purpose of speed protection of the target vehicle in the automatic running state, avoiding the need of repeatedly manually adjusting by a user to recover to the automatic running state again, and further achieving the effect of simplifying the vehicle control operation.

Optionally, as an optional implementation manner, as shown in fig. 2, the vehicle control method includes:

s202, acquiring the motion state of a target virtual character in the process of controlling the target virtual character to run a game task at one game client;

s204, under the condition that the motion state indicates that the target virtual character moves by taking the target carrier and the target carrier is in an automatic running state, acquiring the current target running speed of the target carrier;

and S206, controlling the target vehicle to keep an automatic driving state under the condition that the target driving speed is in a target speed interval configured for the target vehicle, wherein the target speed interval is used for triggering switching control of the automatic driving state.

Optionally, in this embodiment, the vehicle control method may be applied, but not limited to, in game applications that require a vehicle to assist a target virtual character in a game scene to complete a game task, such as a remote shooting type game application, a racing type game application, and the like, and the moving time of the target virtual character is shortened by controlling the target virtual character to ride the vehicle. The Game application may be a Multiplayer Online tactical sports Game (MOBA) or a Single-Player Game (SPG). It should be noted that the types of game applications described above may include, but are not limited to, at least one of the following: two-dimensional (2D) game applications, Three-dimensional (3D) game applications, Virtual Reality (VR) game applications, Augmented Reality (AR) game applications, Mixed Reality (MR) game applications. The above is merely an example, and the present embodiment is not limited to this.

Optionally, in this embodiment, the motion state of the target virtual character may include, but is not limited to: the riding target carrier moves and moves independently. That is, when the target virtual character receives a movement command and needs to move from point a to point B, one vehicle may be selected to complete the movement, or the movement may be completed by walking or running. In the process of adopting the carrier to move, the moving time of the target virtual character for completing the movement is shortened.

In addition, in the present embodiment, the driving status of the target vehicle may include, but is not limited to: a manual driving state, an automatic driving state, wherein in the manual driving state, the target vehicle needs a user to manually control the moving direction and the moving speed. For example, the moving direction and moving speed of the target vehicle are controlled by control keys and/or a control rocker arranged in the game client. Under the automatic driving state, the target vehicle automatically moves forwards at a constant speed according to the preset driving speed without manually interfering the driving process of the vehicle by a user, so that the user can conveniently execute other game operations in the process of taking the target vehicle to ensure the completion of game tasks.

In the present embodiment, the target speed interval may be, but is not limited to, configured for the target vehicle in advance, and is used for triggering the switching control of the automatic driving state of the target vehicle. For example, when the current target running speed of the target vehicle is in the target speed interval, controlling the target vehicle to keep an automatic running state; and when the current target running speed of the target vehicle is greater than the upper limit speed of the target speed interval or when the current target running speed of the target vehicle is less than the lower limit speed of the target speed interval, triggering the target vehicle to be switched from the automatic running state to the manual running state.

Alternatively, in the present embodiment, the target driving speed may be, but not limited to, a current driving speed obtained by monitoring the target vehicle in real time for the terminal device. That is, after the adjustment operation of the speed adjustment is performed on the target vehicle, the target traveling speed may be, but is not limited to, the adjusted traveling speed of the target vehicle. Wherein, the adjusting operation may include, but is not limited to, one of the following:

1) and acquiring a speed adjusting instruction triggered by executing man-machine interaction operation in the game client. The man-machine interaction operation may be, but is not limited to, a click operation performed on a man-machine interaction key set in a man-machine interaction interface in the game client or a slide operation performed on a man-machine interaction area. The man-machine interaction operation is used for adjusting the running speed of the target vehicle, such as acceleration operation or deceleration operation. That is, the target vehicle running speed is controlled and adjusted in a targeted manner through an active triggering mode.

For example, as shown in fig. 3, when the target virtual character is riding on the target vehicle and the target vehicle is in the automatic travel state, the click operation performed on the acceleration button is acquired, and the acceleration operation is performed on the target vehicle, so that the adjusted travel speed is obtained as the current target travel speed of the target vehicle.

2) And under the condition that the target carrier is detected to collide with a target prop object set in the game task, adjusting the running speed of the target carrier according to the prop type of the target prop object. The prop type of the target prop object may include, but is not limited to: an additive type prop object, and an obstacle type prop object. If the target carrier is determined to collide with the item object of the addition class, performing acceleration operation on the target carrier; and executing deceleration operation on the target vehicle under the condition that the target vehicle is determined to collide with the obstacle type prop object. That is, the driving speed of the target vehicle is adaptively adjusted by passive triggering control.

It should be noted that the method for determining that the target carrier collides with the target item object includes: (1) the target vehicle is provided with a first collision monitoring range, the target prop object is also provided with a second collision monitoring range, and the target vehicle and the target prop object are determined to collide under the condition that intersection of the first collision monitoring range and the second collision monitoring range is detected; (2) the target carrier is provided with a first collision monitoring range, and when the position of the target prop object is detected to be located in the first collision monitoring range, the target carrier is determined to collide with the target prop object; (3) and the target prop object is also provided with a second collision monitoring range, and when the position of the target carrier is detected to be positioned in the second collision monitoring range, the target carrier is determined to collide with the target prop object.

For example, as shown in fig. 4, when the target virtual character is riding on a target vehicle and the target vehicle is in an automatic traveling state, and when it is detected that the target vehicle collides with an obstacle object (such as an obstacle shown in fig. 4) of an obstacle type, a deceleration operation is performed on the target vehicle, and an adjusted traveling speed is obtained as a current target traveling speed of the target vehicle.

Further, in this embodiment, when the target vehicle collides with an obstacle object, the collision may include, but is not limited to: comparing the obstacle height of the obstacle type prop object with the tire radius of the target vehicle; and when the obstacle height is larger than or equal to the tire radius, determining that the target vehicle cannot cross the obstacle object of the obstacle class, and executing deceleration operation until the running speed is reduced to zero (less than the lower limit speed of the target speed interval). That is, in the case where the obstacle height is larger than the tire radius, the target vehicle will eventually exit the automatic travel state. And under the condition that the obstacle height is smaller than the tire radius, determining a prop object of the target vehicle crossing the obstacle class, and after the target vehicle crosses the prop object of the obstacle class, performing deceleration operation on the target vehicle to obtain an adjusted running speed serving as the current target running speed of the target vehicle.

In addition, in the embodiment, when the traveling speed before the adjustment of the target vehicle is within the target speed interval and the adjusted traveling speed is still within the target speed interval, the target vehicle may be controlled to maintain the automatic traveling state. If the upper limit speed of the target speed interval is 100km/h, the lower limit speed is 80km/h, the running speed of the target vehicle before the acceleration operation is carried out is 85km/h, and the current target running speed obtained after the acceleration operation is carried out is 95 km/h. The target vehicle can be controlled to maintain the automatic traveling state. Further, in the case where no power is applied to the target vehicle to continue acceleration, the target vehicle starts to be passively decelerated due to resistance, but the decelerated traveling speed is still in the target speed range.

In the present embodiment, when it is detected that the current target traveling speed of the target vehicle is greater than the upper limit speed of the target speed section or when it is detected that the current target traveling speed of the target vehicle is less than the lower limit speed of the target speed section, the target vehicle is controlled to be switched from the automatic traveling state to the non-automatic traveling state (which may also be referred to as a manual traveling state). If the upper limit speed of the target speed interval is 100km/h, the lower limit speed is 80km/h, the running speed of the target vehicle before the acceleration operation is performed is 85km/h, and the current target running speed obtained after the acceleration operation is performed is 110km/h, the target vehicle can be controlled to be switched to a non-automatic running state. Further, in the case where no power is applied to the target vehicle to maintain the traveling speed, the target vehicle starts to be passively decelerated due to the resistance, and the decelerated traveling speed eventually reaches zero since the target vehicle enters the non-automatic traveling state.

Optionally, in this embodiment, before acquiring the current target traveling speed of the target vehicle, the method may further include, but is not limited to: in the case where it is determined that the automatic travel mode has been configured for the target vehicle, a travel speed of the target vehicle is detected. And determining an operation mode configured for the game task and prompting information at a position matched with the operation mode under the condition that the running speed of the target vehicle is in a target speed interval and the duration reaches a target threshold value. And after a confirmation instruction is acquired according to the prompt information, determining that the target vehicle enters an automatic driving state, wherein the confirmation instruction is an instruction triggered by a user object using the game client to execute a confirmation operation.

Further, in the present embodiment, the above operation mode may include, but is not limited to, at least one of the following: a key control mode, a single rocker control mode and a rocker key combination control mode. The key control mode here may be that four direction control keys, such as "up", "down", "left", and "right", are arranged in the human-computer interaction interface of the game client. The four direction control keys can be arranged on one side of the human-computer interaction interface (the user can control the human-computer interaction interface with one hand) or on two sides of the human-computer interaction interface (the user can control the human-computer interaction interface with two hands, for example, one side is 'up' and 'down', and the other side is 'left' and 'right'). Here, "up" and "down" may be used to control the target vehicle to advance or reverse, and "left" and "right" are used to control the target vehicle to turn left or right. The single-rocker control mode may be to provide a rocker control panel in the human-machine interface of the game client. The swing rod control panel slides in the swing rod control panel to realize the movement control of the target carrier in four directions of up, down, left and right. The rocker button can be provided with a steering wheel and an acceleration button (also called as an accelerator) in a man-machine interaction interface in combination with a control mode. The steering wheel is used for controlling the target vehicle to turn left or turn right, and the acceleration key is used for controlling the target vehicle to advance.

The description is made with reference to the example shown in fig. 5: it is assumed that a target virtual character is controlled to perform one game task in a remote shooting-type game client. Further, in the case that it is determined that the target virtual character is moving on the target vehicle according to the motion state of the target virtual character, the steps S502 to S514 are executed:

in step S502, the driving mode configured for the target vehicle is obtained, and if it is determined in step S504-1 that the driving mode is the non-automatic driving mode, step S506-1 is executed to control the target vehicle to be in the manual driving state all the time without detecting whether the current target driving speed of the target vehicle is in the target speed interval. Further, it may be continuously detected whether the driving mode of the target vehicle is adjusted to the automatic driving mode in the game task.

In the case where the target vehicle is determined to be in the automatic driving mode in step S504-2, step S506-2 is executed to determine whether the current target driving speed of the target vehicle is within the target speed range and the duration thereof reaches the target threshold? And under the condition that the current target running speed of the target carrier is determined to be in the target speed interval and the duration reaches the target threshold value, acquiring an operation mode configured for the game task, and determining a confirmation mode of the automatic running state according to the operation mode. If the operation mode is determined to be the key control mode, a first determination manner of the automatic driving state is adopted (for example, a first prompt key is displayed at a first position matched with the key control mode) in steps S508-1 to S510-1; if the operation mode is determined to be the single-rocker control mode, adopting a second confirmation mode of the automatic driving state (for example, displaying a prompt track on the operation area matched with the single-rocker control mode) in steps S508-2 to S510-2; in step S508-3 to step S510-3, if the operation mode is determined to be the rocker key combination control mode, a third confirmation manner of the automatic driving state is adopted (for example, a second prompt key is displayed at a second position matching the rocker key combination control mode).

Further, in step S512-1, if it is detected that the target vehicle is not confirmed to enter the automatic driving state according to the confirmation method, that is, the target vehicle is still in the manual driving state, the method returns to step S502 to continue the detection. In steps S512-2 to S514, upon detecting that the target vehicle is confirmed to enter the automatic traveling state according to the confirmation method, the speed protection is performed on the target vehicle (i.e. the target vehicle is controlled to maintain the automatic traveling state if the target traveling speed of the target vehicle is within the target speed interval). And continuously detecting the current target running speed of the target carrier.

In step S506-2, if it is determined that the current target traveling speed of the target vehicle is not within the target speed interval and/or the duration of the target speed interval does not reach the target threshold, it is determined that the target vehicle is still in the manual traveling state (as in step S512-1), and the process returns to step S504-2 for continuous detection.

According to the embodiment provided by the application, in the process that the game client controls the target virtual character to run one game task, the motion state of the target virtual character is obtained, and under the condition that the motion state indicates that the target virtual character is moving by taking the target carrier and the target carrier is in the automatic running state, the current target running speed of the target carrier is obtained. And under the condition that the target running speed is in the target speed interval, controlling the target vehicle to keep an automatic running state so as to avoid triggering the target vehicle to exit the automatic running state due to the change of the running speed of the target vehicle, thereby achieving the purpose of speed protection of the target vehicle in the automatic running state, and avoiding the need of repeatedly manually adjusting by a user to recover to the automatic running state again so as to realize the effect of simplifying the vehicle control operation. And further overcome the problem that the complexity of the vehicle control operation is high because the user needs to manually and frequently switch the vehicle running state in the related technology.

As an alternative, in a case that the motion state indicates that the target virtual character is moving on the target vehicle and the target vehicle is in the automatic driving state, acquiring the current target driving speed of the target vehicle includes:

s1, acquiring a speed adjusting instruction triggered by executing man-machine interaction operation in the game client, wherein the speed adjusting instruction is used for indicating and adjusting the target running speed;

s2, responding to the speed adjusting instruction, adjusting the running speed of the target vehicle to obtain the adjusted running speed;

at S3, the adjusted running speed is set as the acquired target running speed.

Optionally, in this embodiment, the human-computer interaction operation for triggering the speed adjustment instruction may include, but is not limited to, one of the following: the operation for triggering the target vehicle to accelerate and the operation for triggering the target vehicle to decelerate. Furthermore, the operation type of the human-computer interaction operation here may include, but is not limited to, at least one of the following: clicking a key, sliding an interaction area and clicking input voice. For example, an 'acceleration' key for triggering acceleration and a 'brake' key for triggering deceleration are arranged in the human-computer interaction interface; for another example, the interaction area in the human-computer interaction interface is set, and the up-sliding trigger is accelerated, the down-sliding trigger is decelerated, and the like. The above is merely an example, and this is not limited in this embodiment.

Specifically, referring to fig. 3, still taking the remote shooting game application as an example, the game client controls the target virtual character to execute one game task, and when it is determined that the target virtual character is riding on the target vehicle and the target vehicle is in the automatic driving state, if a click operation performed on the "acceleration" key shown in fig. 3 is acquired and a speed adjustment command (for example, an acceleration command) is generated in response to the click operation, the game client performs an acceleration operation on the target vehicle ridden on the target virtual character, for example, applies power to obtain an acceleration-adjusted driving speed, and uses the adjusted driving speed as the current target driving speed of the target vehicle. Further, comparing the target running speed with the upper limit speed and the lower limit speed of the target speed interval, and controlling the target vehicle to continuously keep the automatic running state if the target running speed is still in the target speed interval.

According to the embodiment provided by the application, the speed adjusting instruction triggered by executing the man-machine interaction operation in the game client is obtained, the running speed of the target carrier is adjusted in response to the speed adjusting instruction, the current target running speed is obtained, whether the target carrier is still in the automatic running state is further judged according to the target running speed, and therefore the situation that the target carrier is directly triggered to exit the automatic running state when the running speed of the target carrier changes is avoided, the target carrier in the automatic running state is subjected to speed protection, and the problem that the carrier control operation is complex due to the fact that a user needs to frequently and manually switch the running state in the related art is solved.

As an alternative, in a case that the motion state indicates that the target virtual character is moving on the target vehicle and the target vehicle is in the automatic driving state, acquiring the current target driving speed of the target vehicle includes:

s1, determining the item type of the target item object when the collision between the target carrier and the target item object set in the game task is detected;

s2, under the condition that the item type indicates that the target item object is an addition item object, performing acceleration operation on the target vehicle to obtain accelerated running speed as target running speed;

and S3, when the item type indicates that the target item object is an item object of the obstacle type, executing a deceleration operation on the target vehicle to obtain a decelerated running speed as a target running speed.

Optionally, in this embodiment, the target item object may include, but is not limited to: the method comprises the steps of adding a type item object and an obstacle type item object, wherein the adding type item object is used for executing acceleration operation on a target vehicle, such as an acceleration auxiliary item; the obstacle object is used for performing deceleration operation on the target vehicle, such as roadblocks and the like.

It should be noted that, the target item object may be, but is not limited to, set at a predetermined geographic location in the game task, and after the target vehicle travels at the geographic location, the target vehicle will be passively triggered to collide, resulting in deceleration of the target vehicle. The above is merely an example, and this is not limited in this embodiment.

Specifically, referring to fig. 4, still taking the remote shooting game application as an example, the game client controls the target virtual character to execute one game task, and when it is determined that the target virtual character is riding on the target vehicle and the target vehicle is in the automatic running state, if it is detected that the target vehicle collides with an obstacle object (such as an obstacle shown in fig. 4) of the obstacle type as shown in fig. 4, the game client performs a deceleration operation on the target vehicle riding on the target virtual character to obtain a decelerated and adjusted running speed, and the adjusted running speed is used as the current target running speed of the target vehicle. Further, comparing the target running speed with the upper limit speed and the lower limit speed of the target speed interval, and controlling the target vehicle to continuously keep the automatic running state if the target running speed is still in the target speed interval.

Alternatively, in this embodiment, in the step S3, the performing the deceleration operation on the target vehicle to obtain the decelerated traveling speed includes:

s31, comparing the obstacle height of the target prop object with the tire radius of the target vehicle;

s32, determining that the target vehicle cannot cross the target prop object under the condition that the obstacle height is larger than or equal to the radius of the tire; after the target vehicle is subjected to the deceleration operation, the decelerated running speed of the target vehicle reaches zero;

s33, determining that the target vehicle will cross the target prop object under the condition that the obstacle height is smaller than the radius of the tire; and acquiring the decelerated running speed after the target carrier crosses the target prop object.

Specifically, as shown in fig. 6, if the obstacle height h of the obstacle object is greater than the tire radius r, it is determined that the target vehicle cannot cross the obstacle object, and the traveling speed of the target vehicle is finally reduced to zero (less than the lower limit speed of the target speed interval) after the target vehicle performs the deceleration operation. That is, in the case where the obstacle height is larger than the tire radius, the target vehicle will eventually exit the automatic travel state.

In addition, as shown in fig. 7, when the obstacle height h is smaller than the tire radius r, it is determined that the target vehicle will cross the item object of the obstacle class. Further, after the target vehicle crosses the obstacle-like item object, a deceleration operation is performed on the target vehicle to obtain an adjusted running speed as the current target running speed of the target vehicle.

According to the embodiment provided by the application, under the condition that the target carrier is detected to collide with the target prop object set in the game task, the prop type of the target prop object is determined; and performing speed adjustment on the target carrier according to the property type to obtain the current target running speed, and further judging whether the target carrier is still in an automatic running state according to the target running speed, so that the target carrier is directly triggered to exit the automatic running state when the running speed of the target carrier changes, the speed protection of the target carrier in the automatic running state is realized, and the problem of complex carrier control operation caused by frequent manual switching of the running state by a user in the related technology is further solved.

As an optional scheme, after obtaining the current target running speed of the target vehicle, the method further includes:

1) controlling the target vehicle to keep an automatic driving state under the condition that the target driving speed is detected to be increased and still less than the upper limit speed of the target speed interval;

2) in the case where it is detected that the target travel speed has decreased but is still greater than the lower limit speed of the target speed section, the target vehicle is controlled to maintain the automatic travel state.

In the present embodiment, when it is determined that the traveling speed of the target vehicle has changed, the changed target traveling speed v and the target speed section [ v ] allocated to the target vehicle are required Lower part,v On the upper part]A comparison is made. Assume that the current target traveling speed v of the target vehicle after the adjustment has increased relative to the traveling speed v0 before the adjustment, but is still less than the upper limit speed v of the target speed section On the upper partAnd controlling the target vehicle to keep the automatic running state. Alternatively, it is assumed that the current target traveling speed v of the target vehicle after the adjustment is reduced from the traveling speed v0 before the adjustment, but is still greater than the lower limit speed v of the target speed section Lower partAnd controlling the target vehicle to keep the automatic running state.

For example, it is assumed that the upper limit speed of the target speed section is 100km/h, the lower limit speed is 80km/h, the running speed of the target vehicle before the acceleration operation is performed is 85km/h, and the current target running speed obtained after the acceleration operation is performed is 95 km/h. The target vehicle can be controlled to maintain the automatic traveling state. Further, in the case where no power is applied to the target vehicle to continue acceleration, the target vehicle starts to be passively decelerated due to resistance, but the decelerated traveling speed is still in the target speed range.

As an optional scheme, after obtaining the current target running speed of the target vehicle, the method further includes:

1) controlling the target vehicle to be switched from an automatic driving state to a non-automatic driving state under the condition that the target driving speed is detected to be larger than the upper limit speed of the target speed interval;

2) and controlling the target vehicle to be switched from the automatic driving state to the non-automatic driving state when the target driving speed is detected to be smaller than the lower limit speed of the target speed section.

In the present embodiment, when it is determined that the traveling speed of the target vehicle has changed, the changed target traveling speed v and the target vehicle arranged for the target vehicle need to be subjected toTarget speed interval [ v ] Lower part,v On the upper part]A comparison is made. Assuming that the current target traveling speed v of the target vehicle after adjustment is greater than the upper limit speed v of the target speed section with respect to the traveling speed v0 before adjustment On the upper partAnd controlling the target vehicle to be switched from the automatic driving state to the non-automatic driving state. Alternatively, it is assumed that the current target traveling speed v of the target vehicle after adjustment is lower than the lower limit speed v of the target speed section with respect to the traveling speed v0 before adjustment Lower partAnd controlling the target vehicle to be switched from the automatic driving state to the non-automatic driving state.

For example, if the upper limit speed of the target speed section is 100km/h, the lower limit speed is 80km/h, the traveling speed of the target vehicle before the acceleration operation is performed is 85km/h, and the current target traveling speed obtained after the acceleration operation is performed is 110km/h, the target vehicle may be controlled to switch to the non-automatic traveling state. Further, in the case where no power is applied to the target vehicle to maintain the traveling speed, the target vehicle starts to be passively decelerated due to the resistance, and the decelerated traveling speed eventually reaches zero since the target vehicle enters the non-automatic traveling state.

By the embodiment provided by the application, when the current target running speed is not in the target speed interval after the target vehicle is detected to be adjusted, the control target vehicle is switched from the automatic running state to the non-automatic running state, and after the acceleration power disappears, the running speed of the target vehicle is reduced along with the control target vehicle and is finally reduced to zero. Therefore, the target carrier is recovered to the manual driving state, and the target carrier can still be ensured to flexibly exit from the automatic driving state.

As an optional scheme, before obtaining the current target running speed of the target vehicle, the method further includes:

s1, detecting a travel speed of the target vehicle in a case where it is determined that the automatic travel mode has been configured for the target vehicle;

s2, determining an operation mode configured for the game task when the running speed of the target vehicle is detected to be in the target speed interval and the duration time reaches the target threshold value;

s3, displaying the prompt information at the position matched with the operation mode in the game client;

and S4, after a confirmation instruction is acquired according to the prompt information, determining that the target vehicle enters an automatic driving state, wherein the confirmation instruction is an instruction triggered by the user object using the game client to execute a confirmation operation.

Optionally, in this embodiment, the game client may further include, but is not limited to, configuring an automatic driving mode for the target vehicle and configuring an operation mode for the game task.

The description is made with reference to the example shown in fig. 8:

as shown in fig. 8, an automatic driving mode may be configured in the configuration interface, and when it is determined that the target vehicle is configured as the automatic driving mode when it is set to "on" as shown in fig. 8, in the case that it is detected that the driving speed of the target vehicle is in the target speed interval and the duration reaches the target threshold, the user may be directly prompted to confirm whether to enter the automatic driving state.

Further, as shown in fig. 8, an operation mode may also be configured in the configuration interface, as shown in fig. 8, where the operation mode includes one of the following: a key control mode, a single rocker control mode and a rocker key combination control mode. Here, the key control mode may be that four direction control keys, such as "up", "down", "left", and "right", are arranged in the human-computer interaction interface of the game client, as shown in fig. 9. Here, "up" and "down" may be used to control the target vehicle to advance or reverse, and "left" and "right" are used to control the target vehicle to turn left or right. The single-rocker control mode may be to provide a rocker control panel in the human-machine interface of the game client. Wherein, the swing rod control panel slides to realize the movement control of the target vehicle in four directions of up, down, left and right, as shown in fig. 10. The rocker button and the control mode may be a steering wheel and an acceleration button (also referred to as a throttle) disposed in the human-computer interface, as shown in fig. 11. The steering wheel is used for controlling the target vehicle to turn left or turn right, and the acceleration key is used for controlling the target vehicle to advance.

Optionally, in this embodiment, displaying the prompt information at the position in the game client that matches the operation mode includes:

1) under the condition that the operation mode is a key control mode, displaying a first prompt key at a first position matched with the key control mode, wherein after the click operation executed on the first prompt key is detected, a confirmation instruction is generated to determine that the target vehicle enters an automatic driving state;

2) under the condition that the operation mode is a single-rocker control mode, displaying a prompt track on an operation area matched with the single-rocker control mode, wherein after detecting that a user object performs sliding operation according to the prompt track, a confirmation instruction is generated to determine that the target vehicle enters an automatic driving state;

3) and under the condition that the operation mode is a rocker key combination control mode, displaying a second prompt key at a second position matched with the rocker key combination control mode, wherein after the click operation executed on the second prompt key is detected, a confirmation instruction is generated, and the target vehicle is determined to enter an automatic driving state.

Specifically, as described with reference to fig. 9, it is assumed that, when the operation mode is the key control mode, the first presentation key is displayed at the first position matching the key control mode. As shown in fig. 9, an automatic travel state confirmation key is provided in the vicinity of the up and down direction keys, and when a confirmation instruction triggered by a click operation performed on the confirmation key by the user object is acquired, it is determined that the control target vehicle enters the automatic travel state.

Specifically, as described with reference to fig. 10, it is assumed that when the operation mode is the single-stick control mode, the presentation trajectory is displayed in the operation area matching the single-stick control mode. As shown in fig. 10, a prompt trajectory is displayed in the area near the joystick control panel, and when a confirmation instruction triggered by a slide operation performed by the user object in accordance with the prompt trajectory is acquired, it is determined that the control target vehicle enters the automatic travel state.

Specifically, as described with reference to fig. 11, it is assumed that, when the operation mode is the rocker key combination control mode, the second prompt key is displayed at the second position matching the rocker key combination control mode. As shown in fig. 11, an automatic travel state confirmation key is provided near the "accelerator", and when a confirmation instruction triggered by a click operation performed on the confirmation key by the user object is acquired, it is determined that the control target vehicle enters the automatic travel state.

By the embodiment provided by the application, aiming at different operation modes configured for the game task, different confirmation prompt modes are determined, so that whether the target vehicle meeting the conditions is controlled to enter the automatic driving state or not is confirmed by using the user object of the game client. Therefore, manual intervention operation of a user is avoided, other game operations in the game task are executed by hands, control operation on the target carrier is simplified, and efficiency of completing the game task is improved.

It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.

According to another aspect of the embodiments of the present invention, there is also provided a vehicle control apparatus for implementing the vehicle control method. As shown in fig. 12, the apparatus includes:

1) a first obtaining unit 1202 configured to obtain a motion state of a target virtual character during a game client controlling the target virtual character to run a one-game task;

2) a second obtaining unit 1204, configured to obtain a current target traveling speed of the target vehicle when the motion state indicates that the target virtual character is moving on the target vehicle and the target vehicle is in an automatic traveling state;

3) a first control unit 1206, configured to control the target vehicle to maintain the automatic traveling state if the target traveling speed is within a target speed interval configured for the target vehicle, where the target speed interval is used to trigger switching control of the automatic traveling state.

Alternatively, in the present embodiment, the vehicle control device may be applied to, but not limited to, game applications that require a vehicle to assist a target virtual character in a game scene to complete a game task, such as a remote shooting type game application, a racing type game application, and the like, and the moving time of the target virtual character is shortened by controlling the target virtual character to ride the vehicle. The Game application may be a Multiplayer Online tactical sports Game (MOBA) or a Single-Player Game (SPG). It should be noted that the types of game applications described above may include, but are not limited to, at least one of the following: two-dimensional (2D) game applications, Three-dimensional (3D) game applications, Virtual Reality (VR) game applications, Augmented Reality (AR) game applications, Mixed Reality (MR) game applications. The above is merely an example, and the present embodiment is not limited to this.

Optionally, in this embodiment, the motion state of the target virtual character may include, but is not limited to: the riding target carrier moves and moves independently. That is, when the target virtual character receives a movement command and needs to move from point a to point B, one vehicle may be selected to complete the movement, or the movement may be completed by walking or running. In the process of adopting the carrier to move, the moving time of the target virtual character for completing the movement is shortened.

In addition, in the present embodiment, the driving status of the target vehicle may include, but is not limited to: a manual driving state, an automatic driving state, wherein in the manual driving state, the target vehicle needs a user to manually control the moving direction and the moving speed. For example, the moving direction and moving speed of the target vehicle are controlled by control keys and/or a control rocker arranged in the game client. Under the automatic driving state, the target vehicle automatically moves forwards at a constant speed according to the preset driving speed without manually interfering the driving process of the vehicle by a user, so that the user can conveniently execute other game operations in the process of taking the target vehicle to ensure the completion of game tasks.

In the present embodiment, the target speed interval may be, but is not limited to, configured for the target vehicle in advance, and is used for triggering the switching control of the automatic driving state of the target vehicle. For example, when the current target running speed of the target vehicle is in the target speed interval, controlling the target vehicle to keep an automatic running state; and when the current target running speed of the target vehicle is greater than the upper limit speed of the target speed interval or when the current target running speed of the target vehicle is less than the lower limit speed of the target speed interval, triggering the target vehicle to be switched from the automatic running state to the manual running state.

27页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:游戏存档的共享方法、装置及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类