CN118059496A - Virtual object control method, device, equipment and storage medium - Google Patents
Virtual object control method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN118059496A CN118059496A CN202211484522.4A CN202211484522A CN118059496A CN 118059496 A CN118059496 A CN 118059496A CN 202211484522 A CN202211484522 A CN 202211484522A CN 118059496 A CN118059496 A CN 118059496A
- Authority
- CN
- China
- Prior art keywords
- virtual
- virtual object
- explosive
- attack
- closed shape
- 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.)
- Pending
Links
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/55—Controlling game characters or game objects based on the game progress
- A63F13/57—Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
- A63F2300/80—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
- A63F2300/8082—Virtual reality
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Processing Or Creating Images (AREA)
Abstract
本申请公开了一种虚拟对象的控制方法、装置、设备及存储介质,属于虚拟世界技术领域。该方法包括:显示位于虚拟环境中的第一虚拟对象和第二虚拟对象;以及响应于对第二虚拟对象的攻击操作,显示第一虚拟对象对第二虚拟对象进行虚拟攻击;在虚拟攻击导致第二虚拟对象被淘汰的情况下,显示在第二虚拟对象周侧掉落虚拟爆破物;响应于对虚拟爆破物的攻击操作,显示虚拟爆破物的爆炸效果。本申请通过在被淘汰的第二虚拟对象周侧掉落虚拟爆破物,并通过对攻击虚拟爆破物导致虚拟爆炸物爆炸;为第一虚拟对象提供了新的触发虚拟爆破物的方式;节省了切换虚拟爆破物道具和等待虚拟爆破物道具生效的时间,提高了人机互动效率。
The present application discloses a control method, device, equipment and storage medium for virtual objects, belonging to the field of virtual world technology. The method includes: displaying a first virtual object and a second virtual object in a virtual environment; and in response to an attack operation on the second virtual object, displaying the first virtual object to perform a virtual attack on the second virtual object; in the case where the virtual attack causes the second virtual object to be eliminated, displaying a virtual explosive dropping around the second virtual object; and in response to the attack operation on the virtual explosive, displaying the explosion effect of the virtual explosive. The present application provides a new way to trigger virtual explosives for the first virtual object by dropping virtual explosives around the eliminated second virtual object and causing the virtual explosives to explode by attacking the virtual explosives; saving the time of switching virtual explosive props and waiting for the virtual explosive props to take effect, thereby improving the efficiency of human-computer interaction.
Description
技术领域Technical Field
本申请涉及虚拟世界技术领域,特别涉及一种虚拟对象的控制方法、装置、设备及存储介质。The present application relates to the field of virtual world technology, and in particular to a control method, device, equipment and storage medium for a virtual object.
背景技术Background technique
在包括虚拟环境的应用程序中通常需要控制的虚拟对象在虚拟环境中进行活动,如:行走、驾驶、攀爬、捡拾物品、作战等。In applications that include a virtual environment, it is usually necessary to control virtual objects to perform activities in the virtual environment, such as walking, driving, climbing, picking up objects, fighting, etc.
在相关技术中,虚拟爆破物通常是虚拟对象装备的战斗道具和战术道具,比如,战斗道具包括对敌方虚拟对象减损虚拟生命值的虚拟投掷道具,如虚拟手雷;战术道具可以形成战术效果,如虚拟闪光弹产生眩光效果;战术道具不会造成敌方虚拟对象减损虚拟生命值。In the related art, virtual explosives are usually combat props and tactical props equipped by virtual objects. For example, combat props include virtual throwing props that reduce the virtual health value of enemy virtual objects, such as virtual grenades; tactical props can form tactical effects, such as virtual flash bombs that produce glare effects; tactical props will not cause the enemy virtual objects to reduce their virtual health value.
然而,上述虚拟爆破物的使用方式较为单一。However, the usage of the above virtual explosives is relatively simple.
发明内容Summary of the invention
本申请提供了一种虚拟对象的控制方法、装置、设备及存储介质,所述技术方案如下:The present application provides a control method, device, equipment and storage medium for a virtual object, and the technical solution is as follows:
根据本申请的一方面,提供了一种虚拟对象的控制方法,所述方法包括:According to one aspect of the present application, a method for controlling a virtual object is provided, the method comprising:
显示位于虚拟环境中的第一虚拟对象和第二虚拟对象;以及响应于对所述第二虚拟对象的攻击操作,显示所述第一虚拟对象对所述第二虚拟对象进行虚拟攻击;Displaying a first virtual object and a second virtual object in a virtual environment; and in response to an attack operation on the second virtual object, displaying the first virtual object to perform a virtual attack on the second virtual object;
在所述虚拟攻击导致所述第二虚拟对象被淘汰的情况下,显示在所述第二虚拟对象周侧掉落虚拟爆破物;When the virtual attack causes the second virtual object to be eliminated, displaying virtual explosives falling around the second virtual object;
响应于对所述虚拟爆破物的攻击操作,显示所述虚拟爆破物的爆炸效果。In response to the attack operation on the virtual explosive, an explosion effect of the virtual explosive is displayed.
在本申请的一种可选设计中,所述第一虚拟对象配置有用于掉落所述虚拟爆破物的虚拟技能;In an optional design of the present application, the first virtual object is configured with a virtual skill for dropping the virtual explosive;
所述在所述虚拟攻击导致所述第二虚拟对象被淘汰的情况下,显示在所述第二虚拟对象周侧掉落虚拟爆破物,包括:When the virtual attack causes the second virtual object to be eliminated, displaying virtual explosives dropped around the second virtual object includes:
响应于所述虚拟攻击导致所述第二虚拟对象被淘汰,触发所述第一虚拟对象配置的所述虚拟技能;In response to the virtual attack causing the second virtual object to be eliminated, triggering the virtual skill configured for the first virtual object;
响应于触发所述虚拟技能,显示在所述第二虚拟对象周侧掉落所述虚拟爆破物,所述虚拟爆破物在所述虚拟环境中移动。In response to triggering the virtual skill, the virtual explosive is displayed to be dropped around the second virtual object, and the virtual explosive moves in the virtual environment.
在本申请的一种可选设计中,所述方法还包括:In an optional design of the present application, the method further includes:
根据虚拟环境中的第三虚拟对象的位置信息,确定所述虚拟爆破物的移动方向;所述第三虚拟对象和所述第二虚拟对象属于相同虚拟阵营。The moving direction of the virtual explosive is determined according to the position information of the third virtual object in the virtual environment; the third virtual object and the second virtual object belong to the same virtual camp.
在本申请的一种可选设计中,所述虚拟环境中存在至少三个所述第三虚拟对象;In an optional design of the present application, there are at least three third virtual objects in the virtual environment;
所述根据虚拟环境中的第三虚拟对象的位置信息,确定所述虚拟爆破物的移动方向,包括:The step of determining the moving direction of the virtual explosive object according to the position information of the third virtual object in the virtual environment includes:
在至少三个所述第三虚拟对象围成的闭合形状中,所述第三虚拟对象的密度超过密度门限的情况下,所述虚拟爆破物的移动方向指向所述闭合形状的几何重心;In a closed shape surrounded by at least three third virtual objects, when the density of the third virtual objects exceeds a density threshold, the moving direction of the virtual explosive points to the geometric center of gravity of the closed shape;
和/或,在所述闭合形状中,所述第三虚拟对象的密度未超过密度门限的情况下,所述虚拟爆破物的移动方向指向任意两个所述第三虚拟对象的位置连线的中点。And/or, in the closed shape, when the density of the third virtual object does not exceed a density threshold, the moving direction of the virtual explosive points to the midpoint of a line connecting the positions of any two of the third virtual objects.
在本申请的一种可选设计中,所述在至少三个所述第三虚拟对象围成的闭合形状中,所述第三虚拟对象的密度超过密度门限的情况下,所述虚拟爆破物的移动方向指向所述闭合形状的几何重心,包括:In an optional design of the present application, in a closed shape surrounded by at least three third virtual objects, when the density of the third virtual objects exceeds a density threshold, the moving direction of the virtual explosive points to the geometric center of gravity of the closed shape, including:
在所述虚拟环境中确定第一闭合形状,所述第一闭合形状是以至少三个所述第三虚拟对象为顶点围成的;所述第一闭合形状包括a个所述第三虚拟对象;Determining a first closed shape in the virtual environment, wherein the first closed shape is surrounded by at least three of the third virtual objects as vertices; the first closed shape includes a number of the third virtual objects;
在所述第一闭合形状中所述第三虚拟对象的密度超过所述密度门限的情况下,确定所述虚拟爆破物的移动方向指向所述第一闭合形状的几何重心;When the density of the third virtual object in the first closed shape exceeds the density threshold, determining that the moving direction of the virtual explosive is directed to the geometric center of gravity of the first closed shape;
在所述第一闭合形状中所述第三虚拟对象的密度未超过所述密度门限的情况下,在所述第一闭合形状中确定第二闭合形状,所述第二闭合形状是以至少三个所述第三虚拟对象为顶点围成的,所述第二闭合形状包括b个所述第三虚拟对象;a大于b,且a、b均为大于2的整数;When the density of the third virtual objects in the first closed shape does not exceed the density threshold, a second closed shape is determined in the first closed shape, wherein the second closed shape is surrounded by at least three of the third virtual objects as vertices, and the second closed shape includes b third virtual objects; a is greater than b, and both a and b are integers greater than 2;
在所述第二闭合形状中所述第三虚拟对象的密度超过所述密度门限的情况下,确定所述虚拟爆破物的移动方向指向所述第二闭合形状的几何重心。When the density of the third virtual object in the second closed shape exceeds the density threshold, the moving direction of the virtual explosive is determined to point to the geometric center of gravity of the second closed shape.
在本申请的一种可选设计中,所述在所述闭合形状中,所述第三虚拟对象的密度未超过密度门限的情况下,所述虚拟爆破物的移动方向指向任意两个所述第三虚拟对象的位置连线的中点,包括:In an optional design of the present application, in the closed shape, when the density of the third virtual object does not exceed the density threshold, the moving direction of the virtual explosive points to the midpoint of the line connecting the positions of any two third virtual objects, including:
在所述第二闭合形状中所述第三虚拟对象的密度未超过所述密度门限的情况下,确定所述虚拟爆破物的移动方向指向所述第二闭合形状中任意两个所述第三虚拟对象的位置连线的中点。When the density of the third virtual objects in the second closed shape does not exceed the density threshold, the moving direction of the virtual explosive is determined to point to the midpoint of a line connecting the positions of any two third virtual objects in the second closed shape.
在本申请的一种可选设计中,在所述第一闭合形状中所述第三虚拟对象的密度未超过稀疏门限的情况下,所述第二闭合形状包括邻近虚拟对象组,所述邻近虚拟对象组是所述虚拟环境中距离最短的两个所述第三虚拟对象;In an optional design of the present application, when the density of the third virtual object in the first closed shape does not exceed a sparse threshold, the second closed shape includes a group of adjacent virtual objects, and the group of adjacent virtual objects is two of the third virtual objects with the shortest distance in the virtual environment;
所述在所述第二闭合形状中所述第三虚拟对象的密度未超过所述密度门限的情况下,确定所述虚拟爆破物的移动方向指向所述第二闭合形状中任意两个所述第三虚拟对象的位置连线的中点,包括:When the density of the third virtual objects in the second closed shape does not exceed the density threshold, determining that the moving direction of the virtual explosive points to the midpoint of a line connecting the positions of any two third virtual objects in the second closed shape comprises:
在所述第二闭合形状中所述第三虚拟对象的密度未超过所述密度门限的情况下,确定所述虚拟爆破物的移动方向指向距离最短的两个所述第三虚拟对象的位置连线的中点。When the density of the third virtual objects in the second closed shape does not exceed the density threshold, the moving direction of the virtual explosive is determined to point to the midpoint of the line connecting the positions of the two third virtual objects with the shortest distance.
根据本申请的另一方面,提供了一种虚拟对象的控制装置,所述装置包括:According to another aspect of the present application, a control device for a virtual object is provided, the device comprising:
显示模块,用于显示位于虚拟环境中的第一虚拟对象和第二虚拟对象;以及响应于对所述第二虚拟对象的攻击操作,显示所述第一虚拟对象对所述第二虚拟对象进行虚拟攻击;A display module, configured to display a first virtual object and a second virtual object in a virtual environment; and in response to an attack operation on the second virtual object, display the first virtual object performing a virtual attack on the second virtual object;
所述显示模块,还用于在所述虚拟攻击导致所述第二虚拟对象被淘汰的情况下,显示在所述第二虚拟对象周侧掉落虚拟爆破物;The display module is further configured to display virtual explosives dropped around the second virtual object when the virtual attack causes the second virtual object to be eliminated;
所述显示模块,还用于响应于对所述虚拟爆破物的攻击操作,显示所述虚拟爆破物的爆炸效果。The display module is further used to display the explosion effect of the virtual explosive in response to the attack operation on the virtual explosive.
在本申请的一种可选设计中,所述第一虚拟对象配置有用于掉落所述虚拟爆破物的虚拟技能;In an optional design of the present application, the first virtual object is configured with a virtual skill for dropping the virtual explosive;
所述显示模块还用于:The display module is also used for:
响应于所述虚拟攻击导致所述第二虚拟对象被淘汰,触发所述第一虚拟对象配置的所述虚拟技能;In response to the virtual attack causing the second virtual object to be eliminated, triggering the virtual skill configured for the first virtual object;
响应于触发所述虚拟技能,显示在所述第二虚拟对象周侧掉落所述虚拟爆破物,所述虚拟爆破物在所述虚拟环境中移动。In response to triggering the virtual skill, the virtual explosive is displayed to be dropped around the second virtual object, and the virtual explosive moves in the virtual environment.
在本申请的一种可选设计中,所述装置还包括:In an optional design of the present application, the device further includes:
确定模块,用于根据虚拟环境中的第三虚拟对象的位置信息,确定所述虚拟爆破物的移动方向;所述第三虚拟对象和所述第二虚拟对象属于相同虚拟阵营。The determination module is used to determine the moving direction of the virtual explosive according to the position information of the third virtual object in the virtual environment; the third virtual object and the second virtual object belong to the same virtual camp.
在本申请的一种可选设计中,所述虚拟环境中存在至少三个所述第三虚拟对象;In an optional design of the present application, there are at least three third virtual objects in the virtual environment;
所述确定模块还用于:The determining module is also used for:
在至少三个所述第三虚拟对象围成的闭合形状中,所述第三虚拟对象的密度超过密度门限的情况下,所述虚拟爆破物的移动方向指向所述闭合形状的几何重心;In a closed shape surrounded by at least three third virtual objects, when the density of the third virtual objects exceeds a density threshold, the moving direction of the virtual explosive points to the geometric center of gravity of the closed shape;
和/或,在所述闭合形状中,所述第三虚拟对象的密度未超过密度门限的情况下,所述虚拟爆破物的移动方向指向任意两个所述第三虚拟对象的位置连线的中点。And/or, in the closed shape, when the density of the third virtual object does not exceed a density threshold, the moving direction of the virtual explosive points to the midpoint of a line connecting the positions of any two of the third virtual objects.
在本申请的一种可选设计中,所述装置还包括:In an optional design of the present application, the device further includes:
确定模块,用于在所述第一虚拟对象持有连续发射类型的虚拟攻击道具的情况下,确定所述虚拟爆破物的移动轨迹存在高度变化;a determination module, configured to determine that the moving trajectory of the virtual explosive has a height change when the first virtual object holds a virtual attack prop of a continuous firing type;
和/或,所述确定模块,还用于在所述第一虚拟对象持有非连续发射类型的虚拟攻击道具的情况下,确定所述虚拟爆破物的移动轨迹不存在高度变化。And/or, the determination module is further configured to determine that there is no height change in the moving trajectory of the virtual explosive when the first virtual object holds a virtual attack prop of a non-continuous firing type.
在本申请的一种可选设计中,所述显示模块还用于:In an optional design of the present application, the display module is also used for:
在所述虚拟爆破物的爆炸生效范围内存在第三虚拟对象的情况下,显示为所述第三虚拟对象添加负面增益效果。In the case where there is a third virtual object within the explosion effective range of the virtual explosive, a negative gain effect is added to the third virtual object.
在本申请的一种可选设计中,所述显示模块还用于:In an optional design of the present application, the display module is also used for:
根据所述第二虚拟对象的类型,确定所述负面增益效果的类型;Determining the type of the negative gain effect according to the type of the second virtual object;
其中,所述负面增益效果的类型包括减损生命值、降低移动速度、降低攻击力、降低攻击速度、遮挡视线中的至少之一。The type of the negative gain effect includes at least one of reducing health value, reducing movement speed, reducing attack power, reducing attack speed, and blocking vision.
在本申请的一种可选设计中,所述显示模块还用于:In an optional design of the present application, the display module is also used for:
根据所述第二虚拟对象的类型,确定候选效果类型,所述候选效果类型包括第一类型和第二类型;Determining, according to the type of the second virtual object, candidate effect types, the candidate effect types including a first type and a second type;
在第一时间戳至第二时间戳之间的时间段对所述虚拟爆破物进行虚拟攻击的情况下,将所述负面增益效果的类型确定为所述第一类型;In a case where a virtual attack is performed on the virtual explosive object during a time period between the first timestamp and the second timestamp, determining the type of the negative gain effect to be the first type;
和/或,在所述第二时间戳之间之后对所述虚拟爆破物进行虚拟攻击的情况下,将所述负面增益效果的类型确定为所述第二类型。And/or, in case a virtual attack is performed on the virtual explosive after the second timestamp, the type of the negative gain effect is determined to be the second type.
根据本申请的另一方面,提供了一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如上方面所述的虚拟对象的控制方法。According to another aspect of the present application, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the control method of the virtual object as described above.
根据本申请的另一方面,提供了一种计算机可读存储介质,所述可读存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由处理器加载并执行以实现如上方面所述的虚拟对象的控制方法。According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the control method of the virtual object as described above.
根据本申请的另一方面,提供了一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,处理器从所述计算机可读存储介质读取并执行所述计算机指令,以实现上述如上方面所述的虚拟对象的控制方法。According to another aspect of the present application, a computer program product is provided, which includes computer instructions stored in a computer-readable storage medium, and a processor reads and executes the computer instructions from the computer-readable storage medium to implement the control method of the virtual object described above.
本申请提供的技术方案带来的有益效果至少包括:The beneficial effects of the technical solution provided by this application include at least:
通过在被淘汰的第二虚拟对象周侧掉落虚拟爆破物,并通过对攻击虚拟爆破物导致虚拟爆炸物爆炸;实现了通过淘汰第二虚拟对象掉落虚拟爆破物,为第一虚拟对象提供了新的触发虚拟爆破物的方式;节省了切换虚拟爆破物道具和等待虚拟爆破物道具生效的时间,提高了人机互动效率。By dropping virtual explosives around the eliminated second virtual object and causing the virtual explosives to explode by attacking the virtual explosives, the virtual explosives are dropped by the eliminated second virtual object, providing a new way of triggering the virtual explosives for the first virtual object; saving the time of switching virtual explosive props and waiting for the virtual explosive props to take effect, and improving the efficiency of human-computer interaction.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
图1是本申请一个示例性实施例提供的计算机系统的结构框图;FIG1 is a block diagram of a computer system provided by an exemplary embodiment of the present application;
图2是本申请一个示例性实施例提供的虚拟场景的界面图;FIG2 is an interface diagram of a virtual scene provided by an exemplary embodiment of the present application;
图3是本申请一个示例性实施例提供的虚拟对象的控制方法的流程图;FIG3 is a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
图4是本申请一个示例性实施例提供的虚拟对象的控制方法的流程图;FIG4 is a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
图5是本申请一个示例性实施例提供的虚拟场景的界面图;FIG5 is an interface diagram of a virtual scene provided by an exemplary embodiment of the present application;
图6是本申请一个示例性实施例提供的虚拟对象的控制方法的流程图;FIG6 is a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
图7是本申请一个示例性实施例提供的虚拟对象的控制方法的流程图;FIG7 is a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
图8是本申请一个示例性实施例提供的虚拟场景的界面图;FIG8 is an interface diagram of a virtual scene provided by an exemplary embodiment of the present application;
图9是本申请一个示例性实施例提供的虚拟对象的控制方法的流程图;FIG9 is a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
图10是本申请一个示例性实施例提供的虚拟场景的界面图;FIG10 is an interface diagram of a virtual scene provided by an exemplary embodiment of the present application;
图11是本申请一个示例性实施例提供的虚拟对象的控制方法的流程图;FIG11 is a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
图12是本申请一个示例性实施例提供的虚拟对象的控制方法的流程图;FIG12 is a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
图13是本申请一个示例性实施例提供的虚拟对象的控制方法的流程图;FIG13 is a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
图14是本申请一个示例性实施例提供的虚拟对象的控制方法的流程图;FIG14 is a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
图15是本申请一个示例性实施例提供的虚拟对象的控制方法的流程图;FIG15 is a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
图16是本申请一个示例性实施例提供的虚拟技能列表的界面图;FIG16 is an interface diagram of a virtual skill list provided by an exemplary embodiment of the present application;
图17是本申请一个示例性实施例提供的虚拟对象的控制装置的结构框图;FIG17 is a structural block diagram of a control device for a virtual object provided by an exemplary embodiment of the present application;
图18是本申请一个示例性实施例提供的计算机设备的结构框图。FIG. 18 is a structural block diagram of a computer device provided by an exemplary embodiment of the present application.
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application more clear, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
在本公开使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开。在本公开和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms "a", "the" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and/or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。例如,本申请中涉及到的攻击操作等对象行为都是在充分授权的情况下获取的。It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the object behaviors such as attack operations involved in this application are all obtained with full authorization.
应当理解,尽管在本公开可能采用术语第一、第二等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本公开范围的情况下,第一参数也可以被称为第二参数,类似地,第二参数也可以被称为第一参数。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
图1示出了本申请一个示例性实施例提供的计算机系统的结构框图。该计算机系统100包括:第一终端110、服务器120、第二终端130。FIG1 shows a block diagram of a computer system provided by an exemplary embodiment of the present application. The computer system 100 includes: a first terminal 110 , a server 120 , and a second terminal 130 .
第一终端110安装和运行有支持虚拟环境的客户端111,该客户端111可以是多人在线对战程序。当第一终端运行客户端111时,第一终端110的屏幕上显示客户端111的用户界面。该客户端111可以是大逃杀射击游戏、虚拟现实(Virtual Reality,VR)应用程序、增强现实(Augmented Reality,AR)程序、三维地图程序、虚拟现实游戏、增强现实游戏、第一人称射击游戏(First-Person Shooting Game,FPS)、第三人称射击游戏(Third-PersonalShooting Game,TPS)、多人在线战术竞技游戏(Multiplayer Online Battle ArenaGames,MOBA)、策略游戏(Simulation Game,SLG)中的任意一种。在本实施例中,以该客户端111是FPS游戏来举例说明。第一终端110是第一用户112使用的终端,第一用户112使用第一终端110控制位于虚拟环境中的第一虚拟对象进行活动,第一虚拟对象可以称为第一用户112的虚拟对象。第一虚拟对象的活动包括但不限于:移动、跳跃、传送、释放技能、使用道具、调整身体姿态、爬行、步行、奔跑、骑行、飞行、跳跃、驾驶、拾取、射击、攻击、投掷中的至少一种。示意性的,第一虚拟对象是第一虚拟对象,比如仿真人物角色或动漫人物角色。The first terminal 110 is installed and runs a client 111 that supports a virtual environment, and the client 111 can be a multiplayer online battle program. When the first terminal runs the client 111, the user interface of the client 111 is displayed on the screen of the first terminal 110. The client 111 can be any one of a battle royale shooting game, a virtual reality (VR) application, an augmented reality (AR) program, a three-dimensional map program, a virtual reality game, an augmented reality game, a first-person shooting game (FPS), a third-person shooting game (TPS), a multiplayer online tactical competitive game (MOBA), and a simulation game (SLG). In this embodiment, the client 111 is an FPS game for example. The first terminal 110 is a terminal used by the first user 112, and the first user 112 uses the first terminal 110 to control the first virtual object in the virtual environment to perform activities, and the first virtual object can be called a virtual object of the first user 112. The activities of the first virtual object include, but are not limited to, at least one of moving, jumping, teleporting, releasing skills, using props, adjusting body posture, crawling, walking, running, riding, flying, jumping, driving, picking up, shooting, attacking, and throwing. Schematically, the first virtual object is a first virtual object, such as a simulated human character or an animated human character.
第二终端130安装和运行有支持虚拟环境的客户端131,该客户端131可以是多人在线对战程序。当第二终端130运行客户端131时,第二终端130的屏幕上显示客户端131的用户界面。该客户端可以是大逃杀射击游戏、VR应用程序、AR程序、三维地图程序、虚拟现实游戏、增强现实游戏、FPS、TPS、MOBA、SLG中的任意一种,在本实施例中,以该客户端是MOBA游戏来举例说明。第二终端130是第二用户132使用的终端,第二用户132使用第二终端130控制位于虚拟环境中的第二虚拟对象进行活动,第二虚拟对象可以称为第二用户132的虚拟对象。示意性的,第二虚拟对象是第二虚拟对象,比如仿真人物角色或动漫人物角色。The second terminal 130 is installed and runs a client 131 that supports a virtual environment, and the client 131 can be a multiplayer online battle program. When the second terminal 130 runs the client 131, the user interface of the client 131 is displayed on the screen of the second terminal 130. The client can be any one of a battle royale shooting game, a VR application, an AR program, a three-dimensional map program, a virtual reality game, an augmented reality game, an FPS, a TPS, a MOBA, and a SLG. In this embodiment, the client is an MOBA game as an example. The second terminal 130 is a terminal used by a second user 132. The second user 132 uses the second terminal 130 to control a second virtual object located in a virtual environment to perform activities. The second virtual object can be referred to as a virtual object of the second user 132. Schematically, the second virtual object is a second virtual object, such as a simulated character or an anime character.
可选地,第一虚拟对象和第二虚拟对象处于同一虚拟环境中。可选地,第一虚拟对象和第二虚拟对象可以属于同一个阵营、同一个队伍、同一个组织、具有好友关系或具有临时性的通讯权限。可选的,第一虚拟对象和第二虚拟对象可以属于不同的阵营、不同的队伍、不同的组织或具有敌对关系。Optionally, the first virtual object and the second virtual object are in the same virtual environment. Optionally, the first virtual object and the second virtual object may belong to the same camp, the same team, the same organization, have a friend relationship, or have temporary communication permissions. Optionally, the first virtual object and the second virtual object may belong to different camps, different teams, different organizations, or have a hostile relationship.
可选地,第一终端110和第二终端130上安装的客户端是相同的,或两个终端上安装的客户端是不同操作系统平台(安卓或IOS)上的同一类型客户端。第一终端110可以泛指多个终端中的一个,第二终端130可以泛指多个终端中的另一个,本实施例仅以第一终端110和第二终端130来举例说明。第一终端110和第二终端130的设备类型相同或不同,该设备类型包括:智能手机、平板电脑、电子书阅读器、MP3播放器、MP4播放器、膝上型便携计算机和台式计算机中的至少一种。Optionally, the client installed on the first terminal 110 and the second terminal 130 is the same, or the client installed on the two terminals is the same type of client on different operating system platforms (Android or IOS). The first terminal 110 may refer to one of a plurality of terminals, and the second terminal 130 may refer to another of a plurality of terminals. This embodiment is only illustrated by taking the first terminal 110 and the second terminal 130 as examples. The device types of the first terminal 110 and the second terminal 130 are the same or different, and the device type includes at least one of: a smart phone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop portable computer, and a desktop computer.
图1中仅示出了两个终端,但在不同实施例中存在多个其它终端140可以接入服务器120。可选地,还存在一个或多个终端140是开发者对应的终端,在终端140上安装有支持虚拟环境的客户端的开发和编辑平台,开发者可在终端140上对客户端进行编辑和更新,并将更新后的客户端安装包通过有线或无线网络传输至服务器120,第一终端110和第二终端130可从服务器120下载客户端安装包实现对客户端的更新。Only two terminals are shown in FIG1 , but in different embodiments, there are multiple other terminals 140 that can access the server 120. Optionally, there are one or more terminals 140 that are terminals corresponding to developers, and a development and editing platform for a client supporting a virtual environment is installed on the terminal 140. The developer can edit and update the client on the terminal 140, and transmit the updated client installation package to the server 120 via a wired or wireless network. The first terminal 110 and the second terminal 130 can download the client installation package from the server 120 to update the client.
第一终端110、第二终端130以及其它终端140通过无线网络或有线网络与服务器120相连。The first terminal 110 , the second terminal 130 , and other terminals 140 are connected to the server 120 via a wireless network or a wired network.
服务器120包括一台服务器、多台服务器、云计算平台和虚拟化中心中的至少一种。服务器120用于为支持三维虚拟环境的客户端提供后台服务。可选地,服务器120承担主要计算工作,终端承担次要计算工作;或者,服务器120承担次要计算工作,终端承担主要计算工作;或者,服务器120和终端之间采用分布式计算架构进行协同计算。The server 120 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. The server 120 is used to provide background services for the client supporting the three-dimensional virtual environment. Optionally, the server 120 undertakes the main computing work and the terminal undertakes the secondary computing work; or, the server 120 undertakes the secondary computing work and the terminal undertakes the main computing work; or, the server 120 and the terminal adopt a distributed computing architecture for collaborative computing.
在一个示意性的例子中,服务器120包括处理器122、用户账号数据库123、对战服务模块124、面向用户的输入/输出接口(Input/Output Interface,I/O接口)125。其中,处理器122用于加载服务器121中存储的指令,处理用户账号数据库123和对战服务模块124中的数据;用户账号数据库123用于存储第一终端110、第二终端130以及其它终端140所使用的用户账号的数据,比如用户账号的头像、用户账号的昵称、用户账号的战斗力指数,用户账号所在的服务区;对战服务模块124用于提供多个对战房间供用户进行对战,比如1V1对战、3V3对战、5V5对战等;面向用户的I/O接口125用于通过无线网络或有线网络和第一终端110和/或第二终端130建立通信交换数据。In an illustrative example, the server 120 includes a processor 122, a user account database 123, a battle service module 124, and a user-oriented input/output interface (I/O interface) 125. The processor 122 is used to load instructions stored in the server 121 and process data in the user account database 123 and the battle service module 124; the user account database 123 is used to store data of user accounts used by the first terminal 110, the second terminal 130, and other terminals 140, such as the user account's avatar, the user account's nickname, the user account's combat power index, and the service area where the user account is located; the battle service module 124 is used to provide multiple battle rooms for users to fight, such as 1V1 battle, 3V3 battle, 5V5 battle, etc.; the user-oriented I/O interface 125 is used to establish communication and exchange data with the first terminal 110 and/or the second terminal 130 through a wireless network or a wired network.
本申请中提供的方法可以但不限于应用于下述场景中的至少一个:虚拟现实应用程序、三维地图程序、第一人称射击游戏(First-Person Shooting Game,FPS)、第三人称射击游戏(Third-Person Shooting Game,TPS)、多人在线战术竞技游戏(MultiplayerOnline Battle Arena Games,MOBA)、多人枪战类生存游戏等,下述实施例是以在游戏中的应用来举例说明。The method provided in the present application can be applied to, but is not limited to, at least one of the following scenarios: virtual reality applications, three-dimensional map programs, first-person shooter games (First-Person Shooting Game, FPS), third-person shooter games (Third-Person Shooting Game, TPS), multiplayer online tactical competitive games (Multiplayer Online Battle Arena Games, MOBA), multiplayer gun battle survival games, etc. The following embodiments are illustrated by using applications in games.
图2提供了本申请一个示例性实施例提供的虚拟场景的界面图。FIG. 2 provides an interface diagram of a virtual scene provided by an exemplary embodiment of the present application.
示例性的,在第一界面210中,显示有第一虚拟对象312、第二虚拟对象314和第三虚拟对象316;具体的,第三虚拟对象的数量为两个。示例性的,在第一界面210中,第一虚拟对象312使用持有的虚拟射击道具,对第二虚拟对象314进行虚拟攻击。Exemplarily, in the first interface 210, a first virtual object 312, a second virtual object 314 and a third virtual object 316 are displayed; specifically, the number of the third virtual objects is two. Exemplarily, in the first interface 210, the first virtual object 312 uses the virtual shooting prop it holds to perform a virtual attack on the second virtual object 314.
在虚拟攻击导致第二虚拟对象314被淘汰的情况下,显示第二界面220;在第二界面220中,第二虚拟对象314被淘汰而倒伏在地面上,在第二虚拟对象314周侧掉落虚拟爆破物314a。When the second virtual object 314 is eliminated due to the virtual attack, the second interface 220 is displayed; in the second interface 220 , the second virtual object 314 is eliminated and falls on the ground, and virtual explosives 314 a fall around the second virtual object 314 .
在第二界面220中,第一虚拟对象312使用持有的虚拟射击道具,对虚拟爆破物314a进行虚拟攻击。响应于对虚拟爆破物314a进行虚拟攻击,显示第三界面230。In the second interface 220, the first virtual object 312 uses the virtual shooting props held by the first virtual object 312 to perform a virtual attack on the virtual explosive 314a. In response to the virtual attack on the virtual explosive 314a, the third interface 230 is displayed.
在第三界面230中,显示虚拟爆破物314a的爆炸效果。第三虚拟对象316位于虚拟爆破物314a的爆炸生效范围内,第三虚拟对象316收到来自虚拟爆破物314a造成的虚拟伤害,减损生命值。The explosion effect of the virtual explosive 314a is displayed in the third interface 230. The third virtual object 316 is located within the explosion effective range of the virtual explosive 314a, and the third virtual object 316 receives virtual damage caused by the virtual explosive 314a, and its health value is reduced.
图3示出了本申请一个示例性实施例提供的虚拟对象的控制方法的流程图。该方法可以由计算机设备执行。该方法包括:FIG3 shows a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application. The method can be executed by a computer device. The method includes:
步骤510:显示位于虚拟环境中的第一虚拟对象和第二虚拟对象;以及响应于对第二虚拟对象的攻击操作,显示第一虚拟对象对第二虚拟对象进行虚拟攻击;Step 510: displaying a first virtual object and a second virtual object in a virtual environment; and in response to an attack operation on the second virtual object, displaying the first virtual object to perform a virtual attack on the second virtual object;
示例性的,该第一虚拟对象为终端登录的用户账号所控制的虚拟对象,虚拟环境用于提供不同虚拟对象之间进行虚拟战术竞技;Exemplarily, the first virtual object is a virtual object controlled by a user account logged in by the terminal, and the virtual environment is used to provide virtual tactical competition between different virtual objects;
示例性的,显示第一虚拟对象包括直接显示第一虚拟对象,或显示第一虚拟对象的视角画面;该第一虚拟对象的视角画面,是以第一虚拟对象的视角来观察虚拟环境所得到的场景画面。可选地,本申请的实施例中,在虚拟环境中通过摄像机模型对虚拟对象进行观察。Exemplarily, displaying the first virtual object includes directly displaying the first virtual object, or displaying a perspective picture of the first virtual object; the perspective picture of the first virtual object is a scene picture obtained by observing the virtual environment from the perspective of the first virtual object. Optionally, in an embodiment of the present application, the virtual object is observed in the virtual environment through a camera model.
示例性的,第一虚拟对象和第二虚拟对象归属于不同虚拟阵营;第二虚拟对象归属的虚拟阵营和第一虚拟对象归属的虚拟阵营可以是敌对关系,也可以是相互中立关系,本申请不加以限制。在一种实现方式中,上述两个阵营是敌对关系,第二虚拟对象主动对第一虚拟对象进行虚拟攻击。在另一种实现方式中,上述两个阵营是中立关系,第二虚拟对象不会主动对第一虚拟对象进行虚拟攻击,在受到第一虚拟对象攻击的情况下,第二虚拟对象对第一虚拟对象进行虚拟攻击。Exemplarily, the first virtual object and the second virtual object belong to different virtual camps; the virtual camp to which the second virtual object belongs and the virtual camp to which the first virtual object belongs may be in a hostile relationship or in a mutually neutral relationship, and this application does not limit this. In one implementation, the two camps are in a hostile relationship, and the second virtual object actively makes a virtual attack on the first virtual object. In another implementation, the two camps are in a neutral relationship, and the second virtual object will not actively make a virtual attack on the first virtual object. When attacked by the first virtual object, the second virtual object makes a virtual attack on the first virtual object.
步骤520:在虚拟攻击导致第二虚拟对象被淘汰的情况下,显示在第二虚拟对象周侧掉落虚拟爆破物;Step 520: When the virtual attack causes the second virtual object to be eliminated, display virtual explosives falling around the second virtual object;
示例性的,响应于第二虚拟对象的生命值减损至零,第二虚拟对象被淘汰。示例性的,第二虚拟对象被淘汰也称为第二虚拟对象被击杀、第二虚拟对象被击倒;上述表述均用于指示第二虚拟对象的生命值减损至零。Exemplarily, in response to the second virtual object's health value being reduced to zero, the second virtual object is eliminated. Exemplarily, the second virtual object being eliminated is also referred to as the second virtual object being killed or the second virtual object being knocked down; the above expressions are all used to indicate that the second virtual object's health value is reduced to zero.
示例性的,虚拟爆破物在第二虚拟对象周侧,但并不代表第二虚拟对象携带有虚拟爆破物,或虚拟爆破物是第二虚拟对象的一部分。在一种实现方式中,掉落虚拟爆破物是由于第一虚拟对象发起虚拟攻击导致的,和第二虚拟对象无关。Exemplarily, the virtual explosive is around the second virtual object, but it does not mean that the second virtual object carries the virtual explosive, or the virtual explosive is a part of the second virtual object. In one implementation, the dropping of the virtual explosive is caused by the first virtual object launching a virtual attack, and has nothing to do with the second virtual object.
具体的,在一个实现方式中,在虚拟环境中其他虚拟对象对第二虚拟对象发起虚拟攻击,在虚拟攻击导致第二虚拟对象被淘汰的情况下,在第二虚拟对象周侧不会掉落有虚拟爆破物。Specifically, in one implementation, in the virtual environment, other virtual objects initiate a virtual attack on the second virtual object. When the virtual attack causes the second virtual object to be eliminated, no virtual explosives will fall around the second virtual object.
步骤530:响应于对虚拟爆破物的攻击操作,显示虚拟爆破物的爆炸效果;Step 530: In response to the attack operation on the virtual explosive, display the explosion effect of the virtual explosive;
示例性的,对虚拟爆破物的攻击操作的实现方式包括但不限于如下至少之一:点击、滑动、转动;比如:点击触摸屏或按键、滑动触摸屏或手柄、转动终端或手柄。示例性的,第一虚拟对象进行虚拟攻击的方式包括但不限于:击发虚拟射击道具、投掷虚拟投掷道具、挥动虚拟器械、释放虚拟技能中的至少之一。本实施例对于第一虚拟对象对第二虚拟对象进行虚拟攻击的具体实现方式不作出任何限制性规定。Exemplarily, the implementation of the attack operation on the virtual explosive includes but is not limited to at least one of the following: clicking, sliding, and rotating; for example: clicking a touch screen or a button, sliding a touch screen or a handle, and rotating a terminal or a handle. Exemplarily, the way the first virtual object performs a virtual attack includes but is not limited to: firing a virtual shooting prop, throwing a virtual throwing prop, swinging a virtual instrument, and releasing a virtual skill. This embodiment does not make any restrictive provisions on the specific implementation of the first virtual object performing a virtual attack on the second virtual object.
相似的,对第二虚拟对象的攻击操作的实现方式包括但不限于如下至少之一:点击、滑动、转动。Similarly, the attack operation on the second virtual object may be implemented in a manner including but not limited to at least one of the following: clicking, sliding, and rotating.
示例性的,虚拟爆破物是可以产生爆炸效果的虚拟物体;在一种实现方式中,虚拟爆破物是可以产生爆炸并造成虚拟伤害,在另一种实现方式中,虚拟爆破物是可以产生爆炸且不会造成虚拟伤害,仅通过虚拟烟雾、虚拟光线、虚拟闪光中的至少之一显示爆炸效果。Exemplarily, the virtual explosive is a virtual object that can produce an explosion effect; in one implementation, the virtual explosive can produce an explosion and cause virtual damage, and in another implementation, the virtual explosive can produce an explosion without causing virtual damage, and the explosion effect is displayed only through at least one of virtual smoke, virtual light, and virtual flash.
综上所述,本实施例提供的方法,通过在被淘汰的第二虚拟对象周侧掉落虚拟爆破物,并通过对攻击虚拟爆破物导致虚拟爆炸物爆炸;实现了通过淘汰第二虚拟对象掉落虚拟爆破物,为第一虚拟对象提供了新的触发虚拟爆破物的方式;节省了切换虚拟爆破物道具和等待虚拟爆破物道具生效的时间,提高了人机互动效率。In summary, the method provided in this embodiment drops virtual explosives around the eliminated second virtual object and causes the virtual explosives to explode by attacking the virtual explosives; the virtual explosives are dropped by the eliminated second virtual object, thereby providing a new way to trigger the virtual explosives for the first virtual object; the time for switching virtual explosive props and waiting for the virtual explosive props to take effect is saved, thereby improving the efficiency of human-computer interaction.
图4示出了本申请一个示例性实施例提供的虚拟对象的控制方法的流程图。该方法可以由计算机设备执行。即在图3示出的实施例中,步骤520可以实现为步骤520a、步骤520b:FIG4 shows a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application. The method can be executed by a computer device. That is, in the embodiment shown in FIG3 , step 520 can be implemented as step 520a and step 520b:
步骤520a:响应于虚拟攻击导致第二虚拟对象被淘汰,触发第一虚拟对象配置的虚拟技能;Step 520a: In response to the virtual attack causing the second virtual object to be eliminated, triggering the virtual skill configured for the first virtual object;
示例性的,第一虚拟对象配置有用于掉落虚拟爆破物的虚拟技能;在一个示例中,在第一虚拟对象配置有上述虚拟技能的情况下,虚拟攻击导致第二虚拟对象被淘汰,显示在第二虚拟对象周侧掉落虚拟爆破物。Exemplarily, the first virtual object is configured with a virtual skill for dropping virtual explosives; in one example, when the first virtual object is configured with the above virtual skill, the virtual attack causes the second virtual object to be eliminated, and virtual explosives are displayed dropping around the second virtual object.
进一步的,第一虚拟对象配置的虚拟技能可以是在虚拟环境中获取的,也可以是在进入虚拟环境之前预先配置的;虚拟技能可以是和第一虚拟对象的类型相互绑定,如第一虚拟对象的角色名称对应有虚拟技能;也可以是和第一虚拟对象的类型无关;本申请对上述内容不做出任何限制性规定。Furthermore, the virtual skills configured for the first virtual object may be acquired in the virtual environment, or may be pre-configured before entering the virtual environment; the virtual skills may be bound to the type of the first virtual object, such as the character name of the first virtual object corresponds to the virtual skills; or they may be unrelated to the type of the first virtual object; this application does not make any restrictive provisions on the above content.
示例性的,虚拟技能是在玩家对战环境(Player Versus Environment,简称PVE)中获得的,虚拟技能在通过虚拟关卡时随机获得。Exemplarily, virtual skills are acquired in a player versus player environment (PVE), and virtual skills are acquired randomly when passing a virtual level.
图5提供了本申请一个示例性实施例提供的虚拟场景的界面图。在第四界面240中,显示有第一虚拟对象312、第二虚拟对象314和第三虚拟对象316;具体的,第三虚拟对象的数量为两个。第一虚拟对象312持有虚拟射击道具312a;通过使用虚拟准星312b对准第二虚拟对象314,并执行攻击操作对第二虚拟对象314发起虚拟攻击。FIG5 provides an interface diagram of a virtual scene provided by an exemplary embodiment of the present application. In the fourth interface 240, a first virtual object 312, a second virtual object 314, and a third virtual object 316 are displayed; specifically, the number of the third virtual objects is two. The first virtual object 312 holds a virtual shooting prop 312a; the first virtual object 312 uses a virtual crosshair 312b to aim at the second virtual object 314, and performs an attack operation to launch a virtual attack on the second virtual object 314.
步骤520b:响应于触发虚拟技能,显示在第二虚拟对象周侧掉落虚拟爆破物;Step 520b: In response to triggering the virtual skill, displaying a virtual explosive dropping around the second virtual object;
可选的,在一种实现方式中,触发虚拟技能对应有显示虚拟技能控件更新为触发状态;在另一种实现方式中,用户界面上不存在虚拟技能控件,触发虚拟技能对应有显示第三虚拟对象进入负面增益状态。Optionally, in one implementation, triggering a virtual skill corresponds to displaying a virtual skill control updated to a triggered state; in another implementation, there is no virtual skill control on the user interface, and triggering a virtual skill corresponds to displaying a third virtual object entering a negative gain state.
示例性的,虚拟爆破物在虚拟环境中移动。在一种可选实现方式中,虚拟爆破物是可以产生爆炸并造成虚拟伤害,虚拟爆破物用于对虚拟环境中和第二虚拟对象属于相同虚拟阵营的虚拟对象产生伤害。在另一种可选实现方式中,虚拟爆破物是可以产生爆炸且不会造成虚拟伤害,虚拟爆破物用于在虚拟环境中产生战术效果,比如:产生虚拟烟雾遮挡视线、产生虚拟闪光在短时间内产生刺眼强光并产生巨大的虚拟噪音、产生虚拟光线指引虚拟环境中的虚拟物体或虚拟对象。Exemplarily, the virtual explosive moves in the virtual environment. In an optional implementation, the virtual explosive can produce an explosion and cause virtual damage, and the virtual explosive is used to cause damage to a virtual object in the virtual environment that belongs to the same virtual camp as the second virtual object. In another optional implementation, the virtual explosive can produce an explosion without causing virtual damage, and the virtual explosive is used to produce tactical effects in the virtual environment, such as: generating virtual smoke to block the line of sight, generating virtual flashes to produce dazzling light and huge virtual noise in a short period of time, and generating virtual light to guide virtual objects or virtual objects in the virtual environment.
综上所述,本实施例提供的方法,通过为第一虚拟对象配置虚拟技能,实现了在被淘汰的第二虚拟对象周侧掉落虚拟爆破物,并通过对攻击虚拟爆破物导致虚拟爆炸物爆炸;基于第一虚拟对象的虚拟技能实现了通过淘汰第二虚拟对象掉落虚拟爆破物,为第一虚拟对象提供了新的触发虚拟爆破物的方式;节省了切换虚拟爆破物道具和等待虚拟爆破物道具生效的时间,提高了人机互动效率,提供了新型虚拟技能,提供了新型人机交互方式。In summary, the method provided in this embodiment configures a virtual skill for the first virtual object, thereby realizing the dropping of virtual explosives around the eliminated second virtual object, and causing the virtual explosives to explode by attacking the virtual explosives; based on the virtual skill of the first virtual object, the virtual explosives are dropped by eliminating the second virtual object, providing a new way to trigger the virtual explosives for the first virtual object; the time for switching virtual explosive props and waiting for the virtual explosive props to take effect is saved, the efficiency of human-computer interaction is improved, a new virtual skill is provided, and a new human-computer interaction method is provided.
接下来,对虚拟爆破物的移动方向进行介绍。Next, the moving direction of the virtual explosives is introduced.
图6示出了本申请一个示例性实施例提供的虚拟对象的控制方法的流程图。该方法可以由计算机设备执行。即在图4示出的实施例的基础上,还包括步骤520c:FIG6 shows a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application. The method can be executed by a computer device. That is, based on the embodiment shown in FIG4 , it further includes step 520c:
步骤520c:根据虚拟环境中的第三虚拟对象的位置信息,确定虚拟爆破物的移动方向;Step 520c: determining the moving direction of the virtual explosive according to the position information of the third virtual object in the virtual environment;
示例性的,虚拟环境中存在有第三虚拟对象,第三虚拟对象和第二虚拟对象属于相同虚拟阵营。虚拟环境中第三虚拟对象的数量可以是一个或多个。Exemplarily, there is a third virtual object in the virtual environment, and the third virtual object and the second virtual object belong to the same virtual camp. The number of the third virtual object in the virtual environment can be one or more.
在一种可选设计中,在虚拟环境中的第三虚拟对象的数量为一个的情况下,虚拟爆破物的移动方向为从第二虚拟对象的位置指向第三虚拟对象的位置的方向。In an optional design, when the number of the third virtual object in the virtual environment is one, the moving direction of the virtual explosive is a direction from the position of the second virtual object to the position of the third virtual object.
在另一种可选设计中,在虚拟环境中的第三虚拟对象的数量为两个的情况下,虚拟爆破物的移动方向为从第二虚拟对象的位置指向两个第三虚拟对象的连线中点的方向。In another optional design, when the number of the third virtual objects in the virtual environment is two, the moving direction of the virtual explosive is a direction from the position of the second virtual object to the midpoint of the line connecting the two third virtual objects.
需要说明的是,第三虚拟对象的数量,可以是第一虚拟对象所在的整个虚拟环境中第三虚拟对象的数量,也可以是虚拟环境中的部分区域中第三虚拟对象的数量;比如,以第一虚拟对象或第二虚拟对象的位置为中心,以预设长度为半径围成的圆形中第三虚拟对象的数量。It should be noted that the number of third virtual objects can be the number of third virtual objects in the entire virtual environment where the first virtual object is located, or the number of third virtual objects in a partial area of the virtual environment; for example, the number of third virtual objects in a circle centered on the position of the first virtual object or the second virtual object and with a preset length as the radius.
综上所述,本实施例提供的方法,通过在被淘汰的第二虚拟对象周侧掉落虚拟爆破物,并通过对攻击虚拟爆破物导致虚拟爆炸物爆炸;基于第一虚拟对象的虚拟技能实现了通过淘汰第二虚拟对象掉落虚拟爆破物,为第一虚拟对象提供了新的触发虚拟爆破物的方式;节省了切换虚拟爆破物道具和等待虚拟爆破物道具生效的时间;实现了在虚拟环境中确定虚拟爆破物的移动方向,避免了对虚拟爆破物的移动方向进行手动选择;提高了人机互动效率,提供了新型虚拟技能,提供了新型人机交互方式。In summary, the method provided in this embodiment drops virtual explosives around the eliminated second virtual object and causes the virtual explosives to explode by attacking the virtual explosives; based on the virtual skill of the first virtual object, the virtual explosives are dropped by eliminating the second virtual object, providing a new way to trigger the virtual explosives for the first virtual object; saving the time of switching virtual explosive props and waiting for the virtual explosive props to take effect; determining the moving direction of the virtual explosive in the virtual environment, avoiding manual selection of the moving direction of the virtual explosive; improving the efficiency of human-computer interaction, providing new virtual skills, and providing a new human-computer interaction method.
图7示出了本申请一个示例性实施例提供的虚拟对象的控制方法的流程图。该方法可以由计算机设备执行。即在图6示出的实施例中,步骤520c可以实现为步骤522、步骤524:FIG7 shows a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application. The method can be executed by a computer device. That is, in the embodiment shown in FIG6 , step 520c can be implemented as step 522 and step 524:
步骤522:在至少三个第三虚拟对象围成的闭合形状中,第三虚拟对象的密度超过密度门限的情况下,虚拟爆破物的移动方向指向闭合形状的几何重心;Step 522: In a closed shape surrounded by at least three third virtual objects, when the density of the third virtual objects exceeds a density threshold, the moving direction of the virtual explosive points to the geometric center of gravity of the closed shape;
本实施例对虚拟环境中存在至少三个第三虚拟对象的情况进行介绍。This embodiment introduces a situation where there are at least three third virtual objects in the virtual environment.
示例性的,至少三个第三虚拟对象围成的闭合形状是以至少三个第三虚拟对象为顶点,围成的闭合形状;上述闭合形状的所有顶点均对应第三虚拟对象的位置。Exemplarily, the closed shape formed by at least three third virtual objects is a closed shape formed with at least three third virtual objects as vertices; all vertices of the closed shape correspond to positions of the third virtual objects.
示例性的,闭合形状的几何重心用于指示将闭合形状视为均质物体时,该均值物体的质量重心点。Exemplarily, the geometric center of gravity of a closed shape is used to indicate the center of gravity of mass of a homogeneous object when the closed shape is regarded as a homogeneous object.
进一步的,可以存在一个或多个第三虚拟对象位于闭合形状的边上,和/或,闭合形状的内部。以四个第三虚拟对象为例进行介绍:Furthermore, there may be one or more third virtual objects located on the edge of the closed shape and/or inside the closed shape. Four third virtual objects are used as an example for introduction:
图8提供了本申请一个示例性实施例提供的虚拟场景的界面图。图中通过第一界面610a、第二界面610b、第三界面610c示出了四个第三虚拟对象在虚拟环境中的位置关系;其中,四个第三虚拟对象包括:虚拟对象A 611a、虚拟对象B 611b、虚拟对象C 611c和虚拟对象D 611d。Fig. 8 provides an interface diagram of a virtual scene provided by an exemplary embodiment of the present application. In the figure, the positional relationship of four third virtual objects in the virtual environment is shown through the first interface 610a, the second interface 610b, and the third interface 610c; wherein the four third virtual objects include: virtual object A 611a, virtual object B 611b, virtual object C 611c, and virtual object D 611d.
在第一界面610a中,四个第三虚拟对象围成四边形621,四边形621的四个顶点位置是四个第三虚拟对象的位置。In the first interface 610 a , four third virtual objects form a quadrilateral 621 , and the four vertex positions of the quadrilateral 621 are the positions of the four third virtual objects.
在第二界面610b中,四个第三虚拟对象围成第一三角形622,第一三角形622的三个顶点位置是虚拟对象A 611a、虚拟对象B 611b和虚拟对象C 611c的位置;虚拟对象D611d的位置在第一三角形622的一条边上。In the second interface 610 b , four third virtual objects form a first triangle 622 , the three vertices of which are virtual object A 611 a , virtual object B 611 b , and virtual object C 611 c ; and the virtual object D 611 d is located on one side of the first triangle 622 .
在第三界面610c中,四个第三虚拟对象围成第二三角形623,第二三角形623的三个顶点位置是虚拟对象A 611a、虚拟对象B 611b和虚拟对象C 611c的位置;虚拟对象D611d的位置在第二三角形623的内部。In the third interface 610 c , four third virtual objects form a second triangle 623 , the three vertices of which are virtual object A 611 a , virtual object B 611 b , and virtual object C 611 c ; the virtual object D 611 d is located inside the second triangle 623 .
在一种可选实现方式中,在虚拟环境中存在至少三个第三虚拟对象,且所有第三虚拟对象位于一条直线上的情况下,虚拟爆破物的移动方向指向任意两个第三虚拟对象的位置连线的中点。进一步的,虚拟爆破物的移动方向指向距离最短的两个第三虚拟对象的位置连线的中点。In an optional implementation, when there are at least three third virtual objects in the virtual environment and all the third virtual objects are located in a straight line, the moving direction of the virtual explosive points to the midpoint of the line connecting the positions of any two third virtual objects. Further, the moving direction of the virtual explosive points to the midpoint of the line connecting the positions of the two third virtual objects with the shortest distance.
步骤524:在闭合形状中,第三虚拟对象的密度未超过密度门限的情况下,虚拟爆破物的移动方向指向任意两个第三虚拟对象的位置连线的中点;Step 524: In the closed shape, when the density of the third virtual object does not exceed the density threshold, the moving direction of the virtual explosive points to the midpoint of the line connecting the positions of any two third virtual objects;
示例性的,在闭合形状中,第三虚拟对象的密度未超过密度门限的情况下,第三虚拟对象在虚拟环境中的分布稀疏,将虚拟爆破物的移动方向确定为指向任意两个第三虚拟对象的位置连线的中点,趋向于虚拟爆炸物的爆炸效果覆盖两个第三虚拟对象,以保证触发虚拟爆破物的效果。Exemplarily, in a closed shape, when the density of the third virtual objects does not exceed the density threshold, the distribution of the third virtual objects in the virtual environment is sparse, and the moving direction of the virtual explosive is determined to point to the midpoint of the line connecting the positions of any two third virtual objects, so as to tend to make the explosion effect of the virtual explosive cover the two third virtual objects to ensure that the effect of the virtual explosive is triggered.
相似的,在闭合形状中,第三虚拟对象的密度未超过密度门限的情况下,第三虚拟对象在虚拟环境中的分布聚集,将虚拟爆破物的移动方向确定为指向闭合形状的几何重心,趋向于虚拟爆炸物的爆炸效果覆盖聚集分布的至少三个第三虚拟对象,提高触发虚拟爆破物的效果。Similarly, in a closed shape, when the density of the third virtual objects does not exceed the density threshold, the distribution of the third virtual objects in the virtual environment is clustered, and the moving direction of the virtual explosive is determined to point to the geometric center of gravity of the closed shape, tending to make the explosion effect of the virtual explosive cover at least three clustered third virtual objects, thereby improving the effect of triggering the virtual explosive.
需要说明的是,本实施例中的步骤522和步骤524可以进行拆分,分别组成新的实施例,本实施例对此不进行任何限制。It should be noted that step 522 and step 524 in this embodiment can be split to form new embodiments respectively, and this embodiment does not impose any limitation on this.
综上所述,本实施例提供的方法,通过在至少三个第三虚拟对象围成的闭合形状中,根据第三虚拟对象的密度,确定虚拟爆破物的移动方向;实现了在虚拟环境中根据第三虚拟对象的位置分布确定虚拟爆破物的移动方向,避免了对虚拟爆破物的移动方向进行手动选择;提高了人机互动效率,提供了新型虚拟技能,提供了新型人机交互方式。In summary, the method provided in this embodiment determines the moving direction of the virtual explosive according to the density of the third virtual objects in a closed shape surrounded by at least three third virtual objects; determines the moving direction of the virtual explosive according to the position distribution of the third virtual objects in the virtual environment, and avoids manual selection of the moving direction of the virtual explosive; improves the efficiency of human-computer interaction, provides new virtual skills, and provides a new human-computer interaction method.
图9示出了本申请一个示例性实施例提供的虚拟对象的控制方法的流程图。该方法可以由计算机设备执行。即在图7示出的实施例中,步骤522可以实现为步骤522a、步骤522b、步骤522c、步骤522d;步骤524可以实现为步骤524a:FIG9 shows a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application. The method can be executed by a computer device. That is, in the embodiment shown in FIG7 , step 522 can be implemented as step 522a, step 522b, step 522c, and step 522d; step 524 can be implemented as step 524a:
步骤522a:在虚拟环境中确定第一闭合形状;Step 522a: Determine a first closed shape in the virtual environment;
示例性的,第一闭合形状是以至少三个第三虚拟对象为顶点围成的;第一闭合形状包括a个第三虚拟对象;a个第三虚拟对象可以是虚拟环境中的部分或全部第三虚拟对象。Exemplarily, the first closed shape is formed with at least three third virtual objects as vertices; the first closed shape includes a third virtual objects; and the a third virtual objects may be part or all of the third virtual objects in the virtual environment.
示例性的,第一闭合形状的顶点对应第三虚拟对象的位置。可以存在一个或多个第三虚拟对象位于闭合形状的边上,和/或,闭合形状的内部。Exemplarily, the vertices of the first closed shape correspond to the positions of the third virtual objects. There may be one or more third virtual objects located on the edge of the closed shape and/or inside the closed shape.
步骤522b:在第一闭合形状中第三虚拟对象的密度超过密度门限的情况下,确定虚拟爆破物的移动方向指向第一闭合形状的几何重心;Step 522b: when the density of the third virtual object in the first closed shape exceeds the density threshold, determine that the moving direction of the virtual explosive is directed to the geometric center of gravity of the first closed shape;
示例性的,第一闭合形状中存在有第二闭合形状,第一闭合形状中存在有至少两个第二闭合形状。在虚拟环境中,第一闭合形状的数量小于第二闭合形状的数量。在第一闭合形状中第三虚拟对象的密度超过密度门限的情况下,第三虚拟对象在第一闭合形状指示的范围中密集分布,避免了进一步确定第二闭合形状。且第一闭合形状的数量小于第二闭合形状的数量,降低了确定虚拟爆破物的移动方向的计算复杂程度。Exemplarily, there is a second closed shape in the first closed shape, and there are at least two second closed shapes in the first closed shape. In the virtual environment, the number of first closed shapes is less than the number of second closed shapes. In the case where the density of the third virtual object in the first closed shape exceeds the density threshold, the third virtual object is densely distributed in the range indicated by the first closed shape, avoiding further determination of the second closed shape. And the number of the first closed shape is less than the number of the second closed shape, which reduces the computational complexity of determining the moving direction of the virtual explosive.
步骤522c:在第一闭合形状中第三虚拟对象的密度未超过密度门限的情况下,在第一闭合形状中确定第二闭合形状;Step 522c: if the density of the third virtual object in the first closed shape does not exceed the density threshold, determine a second closed shape in the first closed shape;
在虚拟环境中,第一闭合形状是包括a个第三虚拟对象的闭合形状,第二闭合形状是包括b个第三虚拟对象的闭合形状,a大于b;且a、b均为大于2的整数。其中,第二闭合形状是以至少三个第三虚拟对象为顶点围成的,第二闭合形状包括b个第三虚拟对象。In the virtual environment, the first closed shape is a closed shape including a third virtual objects, and the second closed shape is a closed shape including b third virtual objects, where a is greater than b; and both a and b are integers greater than 2. The second closed shape is surrounded by at least three third virtual objects as vertices, and the second closed shape includes b third virtual objects.
步骤522d:在第二闭合形状中第三虚拟对象的密度超过密度门限的情况下,确定虚拟爆破物的移动方向指向第二闭合形状的几何重心;Step 522d: when the density of the third virtual object in the second closed shape exceeds the density threshold, determine that the moving direction of the virtual explosive is directed to the geometric center of gravity of the second closed shape;
可选的,对于第一闭合形状中的多个第二闭合形状,确定多个第二闭合形状之后,如果存在多个第二闭合形状中第三虚拟对象的密度超过密度门限,虚拟爆破物的移动方向指向面积最小的第二闭合形状的几何重心;以保证虚拟爆破物的移动方向指向第三虚拟对象密集程度最高的第二闭合形状。Optionally, for multiple second closed shapes in the first closed shape, after determining the multiple second closed shapes, if there are multiple second closed shapes in which the density of third virtual objects exceeds a density threshold, the moving direction of the virtual explosive points to the geometric center of gravity of the second closed shape with the smallest area; to ensure that the moving direction of the virtual explosive points to the second closed shape with the highest density of third virtual objects.
步骤524a:在第二闭合形状中第三虚拟对象的密度未超过密度门限的情况下,确定虚拟爆破物的移动方向指向第二闭合形状中任意两个第三虚拟对象的位置连线的中点;Step 524a: when the density of the third virtual objects in the second closed shape does not exceed the density threshold, determine that the moving direction of the virtual explosive points to the midpoint of the line connecting the positions of any two third virtual objects in the second closed shape;
示例性的,第三虚拟对象在第二闭合形状中的分布稀疏,将虚拟爆破物的移动方向确定为指向任意两个第三虚拟对象的位置连线的中点,趋向于虚拟爆炸物的爆炸效果覆盖两个第三虚拟对象,以保证触发虚拟爆破物的效果。Exemplarily, the third virtual objects are sparsely distributed in the second closed shape, and the moving direction of the virtual explosive is determined to point to the midpoint of the line connecting the positions of any two third virtual objects, so that the explosion effect of the virtual explosive tends to cover the two third virtual objects to ensure that the effect of the virtual explosive is triggered.
可选的,虚拟爆破物的移动方向指向距离最短的两个第三虚拟对象的位置连线的中点。Optionally, the moving direction of the virtual explosive points to the midpoint of a line connecting the positions of two third virtual objects with the shortest distance.
需要说明的是,本实施例中的步骤522a至步骤522d可以进行拆分,组成不存在有步骤524a的新的实施例单独实施,也可以对步骤524a进行拆分,和步骤510、步骤520a、步骤520b、步骤530组成新的实施例单独实施;本实施例对此不进行任何限制。It should be noted that steps 522a to 522d in this embodiment can be split to form a new embodiment without step 524a and implemented separately, or step 524a can be split to form a new embodiment with step 510, step 520a, step 520b, and step 530 and implemented separately; this embodiment does not impose any restrictions on this.
综上所述,本实施例提供的方法,通过在至少三个第三虚拟对象围成的闭合形状中,根据第三虚拟对象的密度,确定虚拟爆破物的移动方向;实现了在虚拟环境中根据第三虚拟对象的位置分布确定虚拟爆破物的移动方向,避免了对虚拟爆破物的移动方向进行手动选择,提高了人机互动效率;通过依次确定第一闭合形状和第二闭合形状,为不同闭合形状直接构建了树状结构,避免了对全部闭合形状的遍历计算,降低了计算的复杂程度。In summary, the method provided in this embodiment determines the moving direction of the virtual explosive according to the density of the third virtual objects in a closed shape surrounded by at least three third virtual objects; determines the moving direction of the virtual explosive according to the position distribution of the third virtual objects in the virtual environment, avoids manual selection of the moving direction of the virtual explosive, and improves the efficiency of human-computer interaction; and directly constructs a tree structure for different closed shapes by sequentially determining the first closed shape and the second closed shape, avoids traversal calculation of all closed shapes, and reduces the complexity of calculation.
图10提供了本申请一个示例性实施例提供的虚拟场景的界面图。第四界面630示出了虚拟环境中存在五个第三虚拟对象:虚拟对象A 631a、虚拟对象B 631b、虚拟对象C631c、虚拟对象D 631d和虚拟对象E 631e。Fig. 10 provides an interface diagram of a virtual scene provided by an exemplary embodiment of the present application. The fourth interface 630 shows that there are five third virtual objects in the virtual environment: virtual object A 631a, virtual object B 631b, virtual object C 631c, virtual object D 631d and virtual object E 631e.
在虚拟环境中,仅存在一个闭合形状包括五个第三虚拟对象,即闭合形状A 632包括五个第三虚拟对象。In the virtual environment, there is only one closed shape including five third virtual objects, that is, the closed shape A 632 includes five third virtual objects.
若闭合形状A 632中第三虚拟对象的密度超过密度门限,确定虚拟爆破物的移动方向指向闭合形状A 632的几何重心;在这种情况下无需对包括四个第三虚拟对象和包括三个第三虚拟对象的闭合形状进行进一步判断,仅通过确定闭合形状A 632,进而确定了虚拟爆破物的移动方向;降低了确定虚拟爆破物的移动方向的计算复杂程度。If the density of the third virtual objects in the closed shape A 632 exceeds the density threshold, the moving direction of the virtual explosive is determined to point to the geometric center of gravity of the closed shape A 632. In this case, there is no need to further judge the closed shape including four third virtual objects and the closed shape including three third virtual objects. The moving direction of the virtual explosive is determined only by determining the closed shape A 632, thereby reducing the computational complexity of determining the moving direction of the virtual explosive.
若闭合形状A 632中第三虚拟对象的密度未超过密度门限,在闭合形状A 632中确定出包括四个第三虚拟对象的闭合形状,如闭合形状B 633;可以理解,闭合形状A 632中存在更多个包括四个第三虚拟对象的闭合形状,为了保证图中描述的清晰仅示出了闭合形状B633。If the density of the third virtual objects in the closed shape A 632 does not exceed the density threshold, a closed shape including four third virtual objects is determined in the closed shape A 632, such as the closed shape B 633; it can be understood that there are more closed shapes including four third virtual objects in the closed shape A 632. In order to ensure the clarity of the description in the figure, only the closed shape B 633 is shown.
若闭合形状B 633中第三虚拟对象的密度超过密度门限,确定虚拟爆破物的移动方向指向闭合形状B 633的几何重心;在这种情况下无需对包括三个第三虚拟对象的四个闭合形状进行进一步判断,降低了确定虚拟爆破物的移动方向的计算复杂程度。If the density of the third virtual object in the closed shape B 633 exceeds the density threshold, the moving direction of the virtual explosive is determined to point to the geometric center of gravity of the closed shape B 633; in this case, there is no need to further judge the four closed shapes including the three third virtual objects, thereby reducing the calculation complexity of determining the moving direction of the virtual explosive.
需要说明的是,本实施例提供的技术方案,为虚拟环境中包括不同数量的闭合形状创设了树状结构,从树状结构中数量少的上层分支开始,对第三虚拟对象的密度是否超过密度门限进行判断,避免了对全部闭合形状进行遍历搜索,且寻找到了局部密度最大的闭合形状降低了确定虚拟爆破物的移动方向的计算复杂程度。It should be noted that the technical solution provided in this embodiment creates a tree structure for closed shapes of different numbers in the virtual environment. Starting from the upper branches with a small number in the tree structure, it is judged whether the density of the third virtual object exceeds the density threshold, thereby avoiding traversal and searching of all closed shapes, and finding the closed shape with the largest local density, thereby reducing the computational complexity of determining the moving direction of the virtual explosive.
图11示出了本申请一个示例性实施例提供的虚拟对象的控制方法的流程图。该方法可以由计算机设备执行。即在图9示出的实施例中,步骤524a可以实现为步骤524b:FIG11 shows a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application. The method can be executed by a computer device. That is, in the embodiment shown in FIG9 , step 524a can be implemented as step 524b:
步骤524b:在第二闭合形状中第三虚拟对象的密度未超过密度门限的情况下,确定虚拟爆破物的移动方向指向距离最短的两个第三虚拟对象的位置连线的中点;Step 524b: when the density of the third virtual objects in the second closed shape does not exceed the density threshold, determine that the moving direction of the virtual explosive points to the midpoint of the line connecting the positions of the two third virtual objects with the shortest distance;
示例性的,在第一闭合形状中第三虚拟对象的密度未超过稀疏门限的情况下,第二闭合形状包括邻近虚拟对象组,邻近虚拟对象组是虚拟环境中距离最短的两个第三虚拟对象。Exemplarily, when the density of the third virtual objects in the first closed shape does not exceed the sparse threshold, the second closed shape includes a group of adjacent virtual objects, where the group of adjacent virtual objects is two third virtual objects with the shortest distance in the virtual environment.
示例性的,稀疏门限小于密度门限;第一闭合形状中第三虚拟对象的密度未超过稀疏门限,用于指示第三虚拟对象在虚拟环境中的位置关系离散程度大。由于第二闭合形状包括邻近虚拟对象组,在第三虚拟对象离散程度大的情况下,包括邻近虚拟对象组的第二闭合形状相较于不包含虚拟对象组的闭合形状具有较高的密度;实现了排除不包含虚拟对象组的闭合形状,将未超过密度门限的闭合相撞提前筛选排除,降低了计算的复杂程度。Exemplarily, the sparse threshold is less than the density threshold; the density of the third virtual object in the first closed shape does not exceed the sparse threshold, which indicates that the positional relationship of the third virtual object in the virtual environment is highly discrete. Since the second closed shape includes a group of adjacent virtual objects, when the third virtual object is highly discrete, the second closed shape including the group of adjacent virtual objects has a higher density than the closed shape not including the group of virtual objects; the closed shape not including the group of virtual objects is excluded, and closed collisions that do not exceed the density threshold are screened out in advance, thereby reducing the complexity of the calculation.
综上所述,本实施例提供的方法,通过在至少三个第三虚拟对象围成的闭合形状中,根据第三虚拟对象的密度,确定虚拟爆破物的移动方向;实现了在虚拟环境中根据第三虚拟对象的位置分布确定虚拟爆破物的移动方向,避免了对虚拟爆破物的移动方向进行手动选择,提高了人机互动效率;通过确定第二闭合形状包括邻近虚拟对象组,为不同闭合形状直接构建了树状结构,将未超过密度门限的闭合相撞提前筛选排除,降低了计算的复杂程度。In summary, the method provided in this embodiment determines the moving direction of the virtual explosive according to the density of the third virtual objects in a closed shape surrounded by at least three third virtual objects; determines the moving direction of the virtual explosive according to the position distribution of the third virtual objects in the virtual environment, avoids manual selection of the moving direction of the virtual explosive, and improves the efficiency of human-computer interaction; by determining that the second closed shape includes a group of adjacent virtual objects, a tree structure is directly constructed for different closed shapes, and closed collisions that do not exceed the density threshold are screened and excluded in advance, thereby reducing the complexity of the calculation.
图12示出了本申请一个示例性实施例提供的虚拟对象的控制方法的流程图。该方法可以由计算机设备执行。即在图4示出的实施例的基础上,还包括步骤520d、步骤520e:FIG12 shows a flowchart of a method for controlling a virtual object provided by an exemplary embodiment of the present application. The method can be executed by a computer device. That is, based on the embodiment shown in FIG4 , it also includes step 520d and step 520e:
步骤520d:在第一虚拟对象持有连续发射类型的虚拟攻击道具的情况下,确定虚拟爆破物的移动轨迹存在高度变化;Step 520d: when the first virtual object holds a virtual attack prop of a continuous firing type, determining that the moving trajectory of the virtual explosive has a height change;
示例性的,连续发射类型的虚拟攻击道具是通过一次触发操作实现多次虚拟攻击的道具,或在保持攻击状态的情况下可以实现多次虚拟攻击的道具。比如:虚拟机枪、虚拟自动步枪、虚拟冲锋枪。For example, a virtual attack prop of the continuous firing type is a prop that can achieve multiple virtual attacks through a single trigger operation, or a prop that can achieve multiple virtual attacks while maintaining an attack state, such as a virtual gun, a virtual automatic rifle, and a virtual submachine gun.
示例性的,在虚拟爆破物的移动轨迹存在高度变化的情况下,虚拟爆破物进行移动从二维平面拓展至三维空间,虚拟爆破物的移动轨迹的复杂程度高。由于连续发射类型的虚拟攻击道具在单位时间内的攻击次数大于非连续发射类型的虚拟攻击道具;通过增加虚拟爆破物的移动轨迹的复杂程度,对击中虚拟爆破物的难度进行了平衡。For example, when the moving trajectory of the virtual explosive changes greatly, the movement of the virtual explosive expands from a two-dimensional plane to a three-dimensional space, and the moving trajectory of the virtual explosive is highly complex. Since the number of attacks per unit time of a virtual attack prop of the continuous firing type is greater than that of a virtual attack prop of the non-continuous firing type; by increasing the complexity of the moving trajectory of the virtual explosive, the difficulty of hitting the virtual explosive is balanced.
步骤520e:在第一虚拟对象持有非连续发射类型的虚拟攻击道具的情况下,确定虚拟爆破物的移动轨迹不存在高度变化;Step 520e: when the first virtual object holds a virtual attack prop of a non-continuous firing type, determining that there is no height change in the moving trajectory of the virtual explosive;
示例性的,非连续发射类型的虚拟攻击道具是通过一次触发操作实现一次虚拟攻击的道具,或在保持攻击状态的情况下实现单次虚拟攻击的道具。比如:虚拟栓动步枪、虚拟手枪、虚拟弓箭。For example, a non-continuous firing type virtual attack prop is a prop that realizes a virtual attack through a single trigger operation, or a prop that realizes a single virtual attack while maintaining an attack state, such as a virtual bolt-action rifle, a virtual pistol, and a virtual bow and arrow.
示例性的,在虚拟爆破物的移动轨迹不存在高度变化的情况下,将虚拟爆破物进行移动限制在二维平面内,虚拟爆破物的移动轨迹的复杂程度低。由于非连续发射类型的虚拟攻击道具在单位时间内的攻击次数小于连续发射类型的虚拟攻击道具;通过降低虚拟爆破物的移动轨迹的复杂程度,对击中虚拟爆破物的难度进行了平衡。For example, when there is no height change in the moving trajectory of the virtual explosive, the movement of the virtual explosive is limited to a two-dimensional plane, and the complexity of the moving trajectory of the virtual explosive is low. Since the number of attacks per unit time of a non-continuously fired virtual attack prop is less than that of a continuously fired virtual attack prop; by reducing the complexity of the moving trajectory of the virtual explosive, the difficulty of hitting the virtual explosive is balanced.
需要说明的是,本实施例中的步骤520d和步骤520e可以进行拆分,分别组成新的实施例,本实施例对此不进行任何限制。It should be noted that step 520d and step 520e in this embodiment can be split to form new embodiments respectively, and this embodiment does not impose any limitation on this.
综上所述,本实施例提供的方法,通过在被淘汰的第二虚拟对象周侧掉落虚拟爆破物,并通过对攻击虚拟爆破物导致虚拟爆炸物爆炸;实现了通过淘汰第二虚拟对象掉落虚拟爆破物,为第一虚拟对象提供了新的触发虚拟爆破物的方式;通过将虚拟爆破物的移动轨迹和第一虚拟对象持有的虚拟攻击道具联系起来,针对虚拟攻击虚拟爆破物提供了新型人机交互方式。In summary, the method provided in this embodiment drops virtual explosives around the eliminated second virtual object and causes the virtual explosives to explode by attacking the virtual explosives; the virtual explosives dropped by the eliminated second virtual object provide a new way to trigger the virtual explosives for the first virtual object; and a new human-computer interaction method is provided for virtual attacks on virtual explosives by linking the movement trajectory of the virtual explosives with the virtual attack props held by the first virtual object.
图13示出了本申请一个示例性实施例提供的虚拟对象的控制方法的流程图。该方法可以由计算机设备执行。即在图3示出的实施例的基础上,还包括步骤542:FIG13 shows a flowchart of a method for controlling a virtual object provided by an exemplary embodiment of the present application. The method can be executed by a computer device. That is, based on the embodiment shown in FIG3 , it also includes step 542:
步骤542:在虚拟爆破物的爆炸生效范围内存在第三虚拟对象的情况下,显示为第三虚拟对象添加负面增益效果;Step 542: when there is a third virtual object within the explosion effective range of the virtual explosive, displaying a negative gain effect added to the third virtual object;
在本实施例中,虚拟爆破物用于对第三虚拟对象添加负面增益效果;第三虚拟对象和第二虚拟对象属于相同的虚拟阵营。进一步的,虚拟爆破物的爆炸生效范围通常为闭合的几何图形。在一种可选的实现方式中,通过分别确定爆炸生效范围的方向、形状比例和面积中的至少之一,在虚拟环境中确定爆炸生效范围。In this embodiment, the virtual explosive is used to add a negative gain effect to the third virtual object; the third virtual object and the second virtual object belong to the same virtual camp. Further, the explosion effective range of the virtual explosive is usually a closed geometric figure. In an optional implementation, the explosion effective range is determined in the virtual environment by respectively determining at least one of the direction, shape ratio and area of the explosion effective range.
示例性的,负面增益效果的类型包括但不限于减损生命值、降低移动速度、降低攻击力、降低攻击速度、遮挡视线中的至少之一。Exemplarily, the types of negative gain effects include, but are not limited to, at least one of reducing health points, reducing movement speed, reducing attack power, reducing attack speed, and blocking vision.
在本实施例的一种可选设计中,如图14所示,还包括步骤540:In an optional design of this embodiment, as shown in FIG14 , step 540 is further included:
步骤540:根据第二虚拟对象的类型,确定负面增益效果的类型;Step 540: Determine the type of the negative gain effect according to the type of the second virtual object;
示例性的,第二虚拟对象的类型对应有负面增益效果的类型。可选的,在第一虚拟对象发起对第二虚拟的虚拟攻击的情况下,确定负面增益效果的类型。具体的,由于在第一虚拟对象发起对第二虚拟的虚拟攻击的情况下,需要计算第一虚拟对象造成的伤害值,且第二虚拟对象的移动幅度小,通过骨骼动画实现第二虚拟对象的移动时,显示虚拟环境需要使用的计算资源量低。确定负面增益效果的类型充分利用闲置的计算资源。Exemplarily, the type of the second virtual object corresponds to the type of negative gain effect. Optionally, in the case where the first virtual object initiates a virtual attack on the second virtual object, the type of negative gain effect is determined. Specifically, since the damage value caused by the first virtual object needs to be calculated when the first virtual object initiates a virtual attack on the second virtual object, and the movement amplitude of the second virtual object is small, when the movement of the second virtual object is realized through skeletal animation, the amount of computing resources required to display the virtual environment is low. Determining the type of negative gain effect makes full use of idle computing resources.
在第二虚拟对象被淘汰的情况下,需要显示第二虚拟对象倒伏在地面上,以及显示第二虚拟对象倒伏后发生消解直至消失的画面;同时还需要显示虚拟爆破物的掉落动画和虚拟爆破物发生移动;需要显示的虚拟对象的数量增加,且移动幅度大;对应的需要使用的计算资源量高;通过避免在第二虚拟对象被淘汰的情况下确定负面增益效果的类型,避免了计算资源的集中使用,避免了计算资源导致的画面不连贯或帧数降低的问题。When the second virtual object is eliminated, it is necessary to display the second virtual object falling to the ground, and to display the scene of the second virtual object dissolving and disappearing after falling; at the same time, it is also necessary to display the falling animation of the virtual explosive and the movement of the virtual explosive; the number of virtual objects that need to be displayed increases, and the movement amplitude is large; the corresponding amount of computing resources that need to be used is high; by avoiding determining the type of negative gain effect when the second virtual object is eliminated, the concentrated use of computing resources is avoided, and the problem of picture inconsistency or frame rate reduction caused by computing resources is avoided.
需要说明的是,本实施例中步骤540可以在步骤510之后至步骤542之前的任意时刻执行,本实施例对步骤540的执行顺序不作出限制性规定。It should be noted that, in this embodiment, step 540 may be executed at any time between step 510 and step 542 , and this embodiment does not impose any restrictive provisions on the execution order of step 540 .
进一步的,在一种可选设计中,步骤540可以实现为如下步骤:Further, in an optional design, step 540 may be implemented as the following steps:
根据第二虚拟对象的类型,确定候选效果类型,候选效果类型包括第一类型和第二类型;Determining candidate effect types according to the type of the second virtual object, the candidate effect types including a first type and a second type;
在第一时间戳至第二时间戳之间的时间段对虚拟爆破物进行虚拟攻击的情况下,将负面增益效果的类型确定为第一类型;In the case where a virtual attack is performed on a virtual explosive object during a time period between the first time stamp and the second time stamp, determining the type of the negative gain effect as a first type;
在第二时间戳之间之后对虚拟爆破物进行虚拟攻击的情况下,将负面增益效果的类型确定为第二类型。In the case where a virtual attack is performed on the virtual explosive after the second time stamp, the type of the negative gain effect is determined to be the second type.
示例性的,第二虚拟对象的类型对应有多个候选效果类型,在不同时间戳对虚拟爆破物进行虚拟攻击对应有不同的负面增益效果的类型,拓展了负面增益效果的选择方式。在一个示例中,虚拟爆破物通过改变颜色,指示不同的负面增益效果的类型,针对为第三虚拟对象添加负面增益效果提供了新型人机交互方式。Exemplarily, the type of the second virtual object corresponds to multiple candidate effect types, and virtual attacks on virtual explosives at different time stamps correspond to different types of negative gain effects, which expands the selection method of negative gain effects. In one example, the virtual explosives indicate different types of negative gain effects by changing colors, providing a new human-computer interaction method for adding negative gain effects to the third virtual object.
需要说明的是,本实施例仅示出了候选效果类型包括两种类型的情景;在一种可选设计中,候选效果类型可以包括更多类型。本实施例对此不进行任何限制。It should be noted that this embodiment only shows a scenario in which the candidate effect types include two types; in an optional design, the candidate effect types may include more types, and this embodiment does not impose any limitation on this.
综上所述,本实施例提供的方法,通过在被淘汰的第二虚拟对象周侧掉落虚拟爆破物,并通过对攻击虚拟爆破物导致虚拟爆炸物爆炸;实现了通过淘汰第二虚拟对象掉落虚拟爆破物,为第一虚拟对象提供了新的触发虚拟爆破物的方式;通过将第二虚拟对象的类型和负面增益效果的类型联系起来,针对虚拟攻击虚拟爆破物提供了新型人机交互方式。In summary, the method provided in this embodiment drops virtual explosives around the eliminated second virtual object and causes the virtual explosives to explode by attacking the virtual explosives; the virtual explosives are dropped by the eliminated second virtual object, providing a new way to trigger the virtual explosives for the first virtual object; and a new human-computer interaction method is provided for virtual attacks on virtual explosives by linking the type of the second virtual object with the type of negative gain effect.
图15示出了本申请一个示例性实施例提供的虚拟对象的控制方法的流程图。该方法可以由计算机设备执行。该方法包括:FIG15 shows a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application. The method may be executed by a computer device. The method includes:
步骤702:进入虚拟关卡;Step 702: Enter a virtual level;
虚拟关卡中对应有虚拟环境,终端登录的用户账号所控制有虚拟环境的虚拟人物。在一种可选实现方式中,虚拟人物也称为第一虚拟对象、虚拟英雄、虚拟战士、主控虚拟角色中的任意之一。The virtual level corresponds to a virtual environment, and the user account logged in by the terminal controls a virtual character in the virtual environment. In an optional implementation, the virtual character is also called any one of a first virtual object, a virtual hero, a virtual warrior, and a master virtual character.
虚拟环境中还存在有虚拟怪物,在一种可选实现方式中,虚拟怪物也称为虚拟野怪、虚拟纳米怪、第二虚拟对象中的任意之一。There are also virtual monsters in the virtual environment. In an optional implementation, the virtual monsters are also called any one of virtual wild monsters, virtual nano monsters, and second virtual objects.
示例性的,虚拟关卡是玩家对战环境关卡,虚拟人物和虚拟怪物属于不同的虚拟阵营,虚拟人物归属的虚拟阵营和虚拟怪物归属的虚拟阵营之间为敌对关系或中立关系,具体介绍请参考上文中步骤510的内容,在本实施例中不再赘述。Exemplarily, the virtual level is a player-versus-environment level, the virtual characters and virtual monsters belong to different virtual camps, and the virtual camp to which the virtual characters belong and the virtual camp to which the virtual monsters belong are in a hostile or neutral relationship. For a detailed introduction, please refer to the content of step 510 above, which will not be repeated in this embodiment.
步骤704:显示虚拟技能列表;Step 704: Displaying a virtual skill list;
响应于终端登录的用户账号进入目标关卡,显示候选技能选择列表。In response to the user account logged in by the terminal entering the target level, a candidate skill selection list is displayed.
图16示出了本申请一个示例性实施例提供的虚拟技能列表的界面图;虚拟技能列表720中展示有三个虚拟技能,包括虚拟技能A 721、虚拟技能B 722、虚拟技能C 723;虚拟技能列表720中显示有提示文字“选择虚拟技能”;通过点击虚拟技能对应的图标,选中目标虚拟技能。Figure 16 shows an interface diagram of a virtual skill list provided by an exemplary embodiment of the present application; three virtual skills are displayed in the virtual skill list 720, including virtual skill A 721, virtual skill B 722, and virtual skill C 723; the virtual skill list 720 displays a prompt text "Select virtual skill"; by clicking the icon corresponding to the virtual skill, the target virtual skill is selected.
步骤706:选择目标虚拟技能;Step 706: Select a target virtual skill;
示例性的,通过对虚拟技能列表的点击操作,在虚拟技能列表示出的多个虚拟技能中选择目标虚拟技能。Exemplarily, by clicking on the virtual skill list, a target virtual skill is selected from a plurality of virtual skills shown in the virtual skill list.
步骤708:攻击虚拟怪物,造成虚拟怪物死亡;Step 708: attacking the virtual monster, causing the virtual monster to die;
终端登录的用户账号所控制的虚拟人物对虚拟怪物进行虚拟攻击;虚拟怪物是非玩家角色(Non-Player Character,NPC)。The virtual character controlled by the user account logged in by the terminal performs a virtual attack on the virtual monster; the virtual monster is a non-player character (NPC).
示例性的,虚拟人物携带有一个或多个虚拟宠物;虚拟宠物是造成虚拟怪物死亡后,基于虚拟怪物转化得到的。也可以称为虚拟怪物被淘汰后,基于虚拟怪物转化得到的。Exemplarily, the virtual character carries one or more virtual pets; the virtual pet is obtained by transforming the virtual monster after the virtual monster dies, or can be called the virtual pet obtained by transforming the virtual monster after the virtual monster is eliminated.
在一种可选实现方式中,虚拟宠物也称为虚拟召唤物、宠物虚拟角色中的任意之一。进一步可选的,虚拟宠物具有第一形态和第二形态,虚拟宠物处于第一形态的情况下,虚拟宠物附着在虚拟人物上,比如附着在虚拟人物的手臂上,也称手臂形态。虚拟宠物处于第二形态的情况下,虚拟宠物和虚拟人物分离,虚拟宠物处于虚拟环境中的地面上,也称地面形态。In an optional implementation, the virtual pet is also referred to as any one of a virtual summon and a pet virtual character. Further optionally, the virtual pet has a first form and a second form. When the virtual pet is in the first form, the virtual pet is attached to the virtual character, such as attached to the arm of the virtual character, which is also called an arm form. When the virtual pet is in the second form, the virtual pet is separated from the virtual character, and the virtual pet is on the ground in the virtual environment, which is also called a ground form.
步骤710:掉落爆破物;Step 710: Dropping explosives;
虚拟怪物死亡后掉落一个爆破物,爆破物缓慢上升运动。After the virtual monster dies, it drops an explosive, which slowly rises up.
步骤712:射击爆破物;Step 712: Shooting explosives;
虚拟人物对爆破物进行射击。The avatar shoots at the explosives.
步骤714:击中爆破物后产生爆炸效果;Step 714: generating an explosion effect after hitting the explosive object;
虚拟人物击中爆破物之后,爆破物发生爆炸,产生范围伤害。After the virtual character hits the explosive, the explosive explodes and causes area damage.
综上所述,本实施例提供的方法,通过在被淘汰的第二虚拟对象周侧掉落虚拟爆破物,并通过对攻击虚拟爆破物导致虚拟爆炸物爆炸;实现了通过淘汰第二虚拟对象掉落虚拟爆破物,为第一虚拟对象提供了新的触发虚拟爆破物的方式;节省了切换虚拟爆破物道具和等待虚拟爆破物道具生效的时间,提高了人机互动效率。In summary, the method provided in this embodiment drops virtual explosives around the eliminated second virtual object and causes the virtual explosives to explode by attacking the virtual explosives; the virtual explosives are dropped by the eliminated second virtual object, thereby providing a new way to trigger the virtual explosives for the first virtual object; the time for switching virtual explosive props and waiting for the virtual explosive props to take effect is saved, thereby improving the efficiency of human-computer interaction.
本领域普通技术人员可以理解,上述实施例可以独立实施,也可以将上述实施例进行自由组合,组合出新的实施例实现本申请的虚拟对象的控制方法。Those skilled in the art can understand that the above embodiments can be implemented independently, or the above embodiments can be freely combined to form new embodiments to implement the virtual object control method of the present application.
图17示出了本申请一个示例性实施例提供的虚拟对象的控制装置的框图。该装置包括:FIG17 shows a block diagram of a virtual object control device provided by an exemplary embodiment of the present application. The device includes:
显示模块810,用于显示位于虚拟环境中的第一虚拟对象和第二虚拟对象;以及响应于对所述第二虚拟对象的攻击操作,显示所述第一虚拟对象对所述第二虚拟对象进行虚拟攻击;The display module 810 is configured to display a first virtual object and a second virtual object in a virtual environment; and in response to an attack operation on the second virtual object, display the first virtual object performing a virtual attack on the second virtual object;
所述显示模块810,还用于在所述虚拟攻击导致所述第二虚拟对象被淘汰的情况下,显示在所述第二虚拟对象周侧掉落虚拟爆破物;The display module 810 is further configured to display virtual explosives dropped around the second virtual object when the virtual attack causes the second virtual object to be eliminated;
所述显示模块810,还用于响应于对所述虚拟爆破物的攻击操作,显示所述虚拟爆破物的爆炸效果。The display module 810 is further configured to display an explosion effect of the virtual explosive in response to an attack operation on the virtual explosive.
在本实施例的一种可选设计中,所述第一虚拟对象配置有用于掉落所述虚拟爆破物的虚拟技能;In an optional design of this embodiment, the first virtual object is configured with a virtual skill for dropping the virtual explosive;
所述显示模块810还用于:The display module 810 is also used for:
响应于所述虚拟攻击导致所述第二虚拟对象被淘汰,触发所述第一虚拟对象配置的所述虚拟技能;In response to the virtual attack causing the second virtual object to be eliminated, triggering the virtual skill configured for the first virtual object;
响应于触发所述虚拟技能,显示在所述第二虚拟对象周侧掉落所述虚拟爆破物,所述虚拟爆破物在所述虚拟环境中移动。In response to triggering the virtual skill, the virtual explosive is displayed to be dropped around the second virtual object, and the virtual explosive moves in the virtual environment.
在本实施例的一种可选设计中,所述装置还包括:In an optional design of this embodiment, the device further includes:
确定模块820,用于根据虚拟环境中的第三虚拟对象的位置信息,确定所述虚拟爆破物的移动方向;所述第三虚拟对象和所述第二虚拟对象属于相同虚拟阵营。The determination module 820 is used to determine the moving direction of the virtual explosive according to the position information of the third virtual object in the virtual environment; the third virtual object and the second virtual object belong to the same virtual camp.
在本实施例的一种可选设计中,所述虚拟环境中存在至少三个所述第三虚拟对象;In an optional design of this embodiment, there are at least three third virtual objects in the virtual environment;
所述确定模块820还用于:The determining module 820 is further configured to:
在至少三个所述第三虚拟对象围成的闭合形状中,所述第三虚拟对象的密度超过密度门限的情况下,所述虚拟爆破物的移动方向指向所述闭合形状的几何重心;In a closed shape surrounded by at least three third virtual objects, when the density of the third virtual objects exceeds a density threshold, the moving direction of the virtual explosive points to the geometric center of gravity of the closed shape;
和/或,在所述闭合形状中,所述第三虚拟对象的密度未超过密度门限的情况下,所述虚拟爆破物的移动方向指向任意两个所述第三虚拟对象的位置连线的中点。And/or, in the closed shape, when the density of the third virtual object does not exceed a density threshold, the moving direction of the virtual explosive points to the midpoint of a line connecting the positions of any two of the third virtual objects.
在本实施例的一种可选设计中,所述确定模块820还用于:In an optional design of this embodiment, the determining module 820 is further configured to:
在所述虚拟环境中确定第一闭合形状,所述第一闭合形状是以至少三个所述第三虚拟对象为顶点围成的;所述第一闭合形状包括a个所述第三虚拟对象;Determining a first closed shape in the virtual environment, wherein the first closed shape is surrounded by at least three of the third virtual objects as vertices; the first closed shape includes a number of the third virtual objects;
在所述第一闭合形状中所述第三虚拟对象的密度超过所述密度门限的情况下,确定所述虚拟爆破物的移动方向指向所述第一闭合形状的几何重心;When the density of the third virtual object in the first closed shape exceeds the density threshold, determining that the moving direction of the virtual explosive is directed to the geometric center of gravity of the first closed shape;
在所述第一闭合形状中所述第三虚拟对象的密度未超过所述密度门限的情况下,在所述第一闭合形状中确定第二闭合形状,所述第二闭合形状是以至少三个所述第三虚拟对象为顶点围成的,所述第二闭合形状包括b个所述第三虚拟对象;a大于b,且a、b均为大于2的整数;When the density of the third virtual objects in the first closed shape does not exceed the density threshold, a second closed shape is determined in the first closed shape, wherein the second closed shape is surrounded by at least three of the third virtual objects as vertices, and the second closed shape includes b third virtual objects; a is greater than b, and both a and b are integers greater than 2;
在所述第二闭合形状中所述第三虚拟对象的密度超过所述密度门限的情况下,确定所述虚拟爆破物的移动方向指向所述第二闭合形状的几何重心。When the density of the third virtual object in the second closed shape exceeds the density threshold, the moving direction of the virtual explosive is determined to point to the geometric center of gravity of the second closed shape.
在本实施例的一种可选设计中,所述确定模块820还用于:In an optional design of this embodiment, the determining module 820 is further configured to:
在所述第二闭合形状中所述第三虚拟对象的密度未超过所述密度门限的情况下,确定所述虚拟爆破物的移动方向指向所述第二闭合形状中任意两个所述第三虚拟对象的位置连线的中点。When the density of the third virtual objects in the second closed shape does not exceed the density threshold, the moving direction of the virtual explosive is determined to point to the midpoint of a line connecting the positions of any two third virtual objects in the second closed shape.
在本实施例的一种可选设计中,在所述第一闭合形状中所述第三虚拟对象的密度未超过稀疏门限的情况下,所述第二闭合形状包括邻近虚拟对象组,所述邻近虚拟对象组是所述虚拟环境中距离最短的两个所述第三虚拟对象;In an optional design of this embodiment, when the density of the third virtual object in the first closed shape does not exceed a sparse threshold, the second closed shape includes a group of adjacent virtual objects, and the group of adjacent virtual objects is two of the third virtual objects with the shortest distance in the virtual environment;
所述确定模块820还用于:The determining module 820 is further configured to:
在所述第二闭合形状中所述第三虚拟对象的密度未超过所述密度门限的情况下,确定所述虚拟爆破物的移动方向指向距离最短的两个所述第三虚拟对象的位置连线的中点。When the density of the third virtual objects in the second closed shape does not exceed the density threshold, the moving direction of the virtual explosive is determined to point to the midpoint of the line connecting the positions of the two third virtual objects with the shortest distance.
在本实施例的一种可选设计中,所述装置还包括:In an optional design of this embodiment, the device further includes:
确定模块820,用于在所述第一虚拟对象持有连续发射类型的虚拟攻击道具的情况下,确定所述虚拟爆破物的移动轨迹存在高度变化;A determination module 820 is used to determine that the moving trajectory of the virtual explosive has a height change when the first virtual object holds a virtual attack prop of a continuous firing type;
和/或,所述确定模块820,还用于在所述第一虚拟对象持有非连续发射类型的虚拟攻击道具的情况下,确定所述虚拟爆破物的移动轨迹不存在高度变化。And/or, the determination module 820 is further configured to determine that there is no height change in the moving trajectory of the virtual explosive when the first virtual object holds a virtual attack prop of a non-continuous firing type.
在本实施例的一种可选设计中,所述显示模块810还用于:In an optional design of this embodiment, the display module 810 is further used for:
在所述虚拟爆破物的爆炸生效范围内存在第三虚拟对象的情况下,显示为所述第三虚拟对象添加负面增益效果。In the case where there is a third virtual object within the explosion effective range of the virtual explosive, a negative gain effect is added to the third virtual object.
在本实施例的一种可选设计中,所述显示模块810还用于:In an optional design of this embodiment, the display module 810 is further used for:
根据所述第二虚拟对象的类型,确定所述负面增益效果的类型;Determining the type of the negative gain effect according to the type of the second virtual object;
其中,所述负面增益效果的类型包括减损生命值、降低移动速度、降低攻击力、降低攻击速度、遮挡视线中的至少之一。The type of the negative gain effect includes at least one of reducing health value, reducing movement speed, reducing attack power, reducing attack speed, and blocking vision.
在本实施例的一种可选设计中,所述显示模块810还用于:In an optional design of this embodiment, the display module 810 is further used for:
根据所述第二虚拟对象的类型,确定候选效果类型,所述候选效果类型包括第一类型和第二类型;Determining, according to the type of the second virtual object, candidate effect types, the candidate effect types including a first type and a second type;
在第一时间戳至第二时间戳之间的时间段对所述虚拟爆破物进行虚拟攻击的情况下,将所述负面增益效果的类型确定为所述第一类型;In a case where a virtual attack is performed on the virtual explosive object during a time period between the first timestamp and the second timestamp, determining the type of the negative gain effect to be the first type;
和/或,在所述第二时间戳之间之后对所述虚拟爆破物进行虚拟攻击的情况下,将所述负面增益效果的类型确定为所述第二类型。And/or, in case a virtual attack is performed on the virtual explosive after the second timestamp, the type of the negative gain effect is determined to be the second type.
需要说明的一点是,上述实施例提供的装置在实现其功能时,仅以上述各个功能模块的划分进行举例说明,实际应用中,可以根据实际需要而将上述功能分配由不同的功能模块完成,即将设备的内容结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。One point that needs to be explained is that, when the device provided in the above embodiment realizes its function, it only uses the division of the above-mentioned functional modules as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述;各个模块执行操作取得的技术效果与有关该方法的实施例中的技术效果相同,此处将不做详细阐述说明。Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method; the technical effects achieved by each module performing operations are the same as those in the embodiment of the method, and will not be elaborated here.
图18示出了本申请一个示例性实施例提供的计算机设备900的结构框图。该计算机设备900可以是便携式移动终端,比如:智能手机、平板电脑、MP3播放器(Moving PictureExperts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(MovingPicture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器。计算机设备900还可能被称为用户设备、便携式终端等其他名称。FIG18 shows a block diagram of a computer device 900 provided by an exemplary embodiment of the present application. The computer device 900 may be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), or an MP4 player (Moving Picture Experts Group Audio Layer IV). The computer device 900 may also be referred to as a user device, a portable terminal, or other names.
通常,计算机设备900包括有:处理器901和存储器902。Typically, the computer device 900 includes a processor 901 and a memory 902 .
处理器901可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器901可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(FieldProgrammable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器901也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central ProcessingUnit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器901可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器901还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。The processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 901 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
存储器902可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是有形的和非暂态的。存储器902还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器902中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器901所执行以实现本申请实施例中提供的虚拟对象的控制方法。The memory 902 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 902 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one instruction, which is used to be executed by the processor 901 to implement the control method of the virtual object provided in the embodiment of the present application.
在一些实施例中,计算机设备900还可选包括有:外围设备接口903和至少一个外围设备。具体地,外围设备包括:射频电路904、触摸显示屏905、摄像头906、音频电路907和电源908中的至少一种。In some embodiments, the computer device 900 may further include: a peripheral device interface 903 and at least one peripheral device. Specifically, the peripheral device includes: at least one of a radio frequency circuit 904 , a touch display screen 905 , a camera 906 , an audio circuit 907 and a power supply 908 .
外围设备接口903可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器901和存储器902。在一些实施例中,处理器901、存储器902和外围设备接口903被集成在同一芯片或电路板上;在一些其他实施例中,处理器901、存储器902和外围设备接口903中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。The peripheral device interface 903 may be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, the memory 902, and the peripheral device interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902, and the peripheral device interface 903 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
射频电路904用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路904通过电磁信号与通信网络以及其他通信设备进行通信。射频电路904将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路904包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等。射频电路904可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:万维网、城域网、内联网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路904还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。The radio frequency circuit 904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 904 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 904 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The radio frequency circuit 904 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and/or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 904 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
触摸显示屏905用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。触摸显示屏905还具有采集在触摸显示屏905的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器901进行处理。触摸显示屏905用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,触摸显示屏905可以为一个,设置计算机设备900的前面板;在另一些实施例中,触摸显示屏905可以为至少两个,分别设置在计算机设备900的不同表面或呈折叠设计;在一些实施例中,触摸显示屏905可以是柔性显示屏,设置在计算机设备900的弯曲表面上或折叠面上。甚至,触摸显示屏905还可以设置成非矩形的不规则图形,也即异形屏。触摸显示屏905可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-EmittingDiode,有机发光二极管)等材质制备。The touch display screen 905 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. The touch display screen 905 also has the ability to collect touch signals on the surface or above the surface of the touch display screen 905. The touch signal may be input to the processor 901 as a control signal for processing. The touch display screen 905 is used to provide virtual buttons and/or virtual keyboards, also known as soft buttons and/or soft keyboards. In some embodiments, the touch display screen 905 may be one, and the front panel of the computer device 900 is set; in other embodiments, the touch display screen 905 may be at least two, which are respectively set on different surfaces of the computer device 900 or are folded; in some embodiments, the touch display screen 905 may be a flexible display screen, which is set on the curved surface or folded surface of the computer device 900. Even, the touch display screen 905 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The touch display screen 905 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
摄像头组件906用于采集图像或视频。可选地,摄像头组件906包括前置摄像头和后置摄像头。通常,前置摄像头用于实现视频通话或自拍,后置摄像头用于实现照片或视频的拍摄。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能,主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能。在一些实施例中,摄像头组件906还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。The camera assembly 906 is used to capture images or videos. Optionally, the camera assembly 906 includes a front camera and a rear camera. Typically, the front camera is used to realize video calls or selfies, and the rear camera is used to realize the shooting of photos or videos. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, and a wide-angle camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, and the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting functions. In some embodiments, the camera assembly 906 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
音频电路907用于提供用户和计算机设备900之间的音频接口。音频电路907可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器901进行处理,或者输入至射频电路904以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在计算机设备900的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器901或射频电路904的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路907还可以包括耳机插孔。The audio circuit 907 is used to provide an audio interface between the user and the computer device 900. The audio circuit 907 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 901 for processing, or input them into the radio frequency circuit 904 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the computer device 900. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 901 or the radio frequency circuit 904 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as distance measurement. In some embodiments, the audio circuit 907 may also include a headphone jack.
电源908用于为计算机设备900中的各个组件进行供电。电源908可以是交流电、直流电、一次性电池或可充电电池。当电源908包括可充电电池时,该可充电电池可以是有线充电电池或无线充电电池。有线充电电池是通过有线线路充电的电池,无线充电电池是通过无线线圈充电的电池。该可充电电池还可以用于支持快充技术。The power supply 908 is used to power various components in the computer device 900. The power supply 908 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 908 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged through a wired line, and a wireless rechargeable battery is a battery that is charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
在一些实施例中,计算机设备900还包括有一个或多个传感器909。该一个或多个传感器909包括但不限于:加速度传感器910、陀螺仪传感器911、压力传感器912、光学传感器913以及接近传感器914。In some embodiments, the computer device 900 further includes one or more sensors 909 , including but not limited to: an acceleration sensor 910 , a gyroscope sensor 911 , a pressure sensor 912 , an optical sensor 913 , and a proximity sensor 914 .
加速度传感器910可以检测以计算机设备900建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器910可以用于检测重力加速度在三个坐标轴上的分量。处理器901可以根据加速度传感器910采集的重力加速度信号,控制触摸显示屏905以横向视图或纵向视图进行用户界面的显示。加速度传感器910还可以用于游戏或者用户的运动数据的采集。The acceleration sensor 910 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the computer device 900. For example, the acceleration sensor 910 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 901 can control the touch display screen 905 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 910. The acceleration sensor 910 can also be used for collecting game or user motion data.
陀螺仪传感器911可以检测计算机设备900的机体方向及转动角度,陀螺仪传感器911可以与加速度传感器910协同采集用户对计算机设备900的3D动作。处理器901根据陀螺仪传感器911采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。The gyro sensor 911 can detect the body direction and rotation angle of the computer device 900, and the gyro sensor 911 can cooperate with the acceleration sensor 910 to collect the user's 3D actions on the computer device 900. The processor 901 can implement the following functions based on the data collected by the gyro sensor 911: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
压力传感器912可以设置在计算机设备900的侧边框和/或触摸显示屏905的下层。当压力传感器912设置在计算机设备900的侧边框时,可以检测用户对计算机设备900的握持信号,根据该握持信号进行左右手识别或快捷操作。当压力传感器912设置在触摸显示屏905的下层时,可以根据用户对触摸显示屏905的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。The pressure sensor 912 can be set on the side frame of the computer device 900 and/or the lower layer of the touch display screen 905. When the pressure sensor 912 is set on the side frame of the computer device 900, it can detect the user's grip signal of the computer device 900, and perform left and right hand recognition or shortcut operation according to the grip signal. When the pressure sensor 912 is set on the lower layer of the touch display screen 905, it can control the operability controls on the UI interface according to the user's pressure operation on the touch display screen 905. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
光学传感器913用于采集环境光强度。在一个实施例中,处理器901可以根据光学传感器913采集的环境光强度,控制触摸显示屏905的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏905的显示亮度;当环境光强度较低时,调低触摸显示屏905的显示亮度。在另一个实施例中,处理器901还可以根据光学传感器913采集的环境光强度,动态调整摄像头组件906的拍摄参数。The optical sensor 913 is used to collect the ambient light intensity. In one embodiment, the processor 901 can control the display brightness of the touch display screen 905 according to the ambient light intensity collected by the optical sensor 913. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 905 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 905 is reduced. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 according to the ambient light intensity collected by the optical sensor 913.
接近传感器914,也称距离传感器,通常设置在计算机设备900的正面。接近传感器914用于采集用户与计算机设备900的正面之间的距离。在一个实施例中,当接近传感器914检测到用户与计算机设备900的正面之间的距离逐渐变小时,由处理器901控制触摸显示屏905从亮屏状态切换为息屏状态;当接近传感器914检测到用户与计算机设备900的正面之间的距离逐渐变大时,由处理器901控制触摸显示屏905从息屏状态切换为亮屏状态。The proximity sensor 914, also called a distance sensor, is usually arranged on the front of the computer device 900. The proximity sensor 914 is used to collect the distance between the user and the front of the computer device 900. In one embodiment, when the proximity sensor 914 detects that the distance between the user and the front of the computer device 900 is gradually decreasing, the processor 901 controls the touch display screen 905 to switch from the screen-on state to the screen-off state; when the proximity sensor 914 detects that the distance between the user and the front of the computer device 900 is gradually increasing, the processor 901 controls the touch display screen 905 to switch from the screen-off state to the screen-on state.
本领域技术人员可以理解,上述示出的结构并不构成对计算机设备900的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art will appreciate that the structure shown above does not constitute a limitation on the computer device 900 , and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
在示例性实施例中,还提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片在计算机设备上运行时,用于实现上述方面所述的虚拟对象的控制方法。In an exemplary embodiment, a chip is also provided. The chip includes a programmable logic circuit and/or program instructions. When the chip runs on a computer device, it is used to implement the control method of the virtual object described in the above aspects.
在示例性实施例中,还提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器从计算机可读存储介质读取并执行该计算机指令,以实现上述各方法实施例提供的虚拟对象的控制方法。In an exemplary embodiment, a computer program product is also provided, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor reads and executes the computer instructions from the computer-readable storage medium to implement the control method of the virtual object provided in the above-mentioned method embodiments.
在示例性实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现上述各方法实施例提供的虚拟对象的控制方法。In an exemplary embodiment, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the virtual object control method provided by the above-mentioned method embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims (15)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211484522.4A CN118059496A (en) | 2022-11-24 | 2022-11-24 | Virtual object control method, device, equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211484522.4A CN118059496A (en) | 2022-11-24 | 2022-11-24 | Virtual object control method, device, equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118059496A true CN118059496A (en) | 2024-05-24 |
Family
ID=91094439
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211484522.4A Pending CN118059496A (en) | 2022-11-24 | 2022-11-24 | Virtual object control method, device, equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118059496A (en) |
-
2022
- 2022-11-24 CN CN202211484522.4A patent/CN118059496A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR102619439B1 (en) | Methods and related devices for controlling virtual objects | |
| CN110585710B (en) | Interactive property control method, device, terminal and storage medium | |
| WO2021184806A1 (en) | Interactive prop display method and apparatus, and terminal and storage medium | |
| CN110917619B (en) | Interactive property control method, device, terminal and storage medium | |
| CN112717410B (en) | Virtual object control method and device, computer equipment and storage medium | |
| CN111921190A (en) | Method, device, terminal and storage medium for equipping props of virtual objects | |
| CN112717394B (en) | Aiming mark display method, device, equipment and storage medium | |
| CN110507990B (en) | Interaction method, device, terminal and storage medium based on virtual aircraft | |
| US12296267B2 (en) | Method and apparatus for operating virtual prop in virtual environment, device and readable medium | |
| CN113144597A (en) | Virtual vehicle display method, device, equipment and storage medium | |
| WO2023029836A1 (en) | Virtual picture display method and apparatus, device, medium, and computer program product | |
| CN111589102B (en) | Auxiliary tool detection method, device, equipment and storage medium | |
| CN111589129B (en) | Virtual object control method, device, equipment and medium | |
| CN112402969B (en) | Virtual object control method, device, equipment and storage medium in virtual scene | |
| CN114404972A (en) | Display method, device and equipment for visual field screen | |
| CN112138392A (en) | Virtual object control method, device, terminal and storage medium | |
| CN118059496A (en) | Virtual object control method, device, equipment and storage medium | |
| CN114470755B (en) | Virtual environment screen display method, device, equipment, medium and program product | |
| HK40031348B (en) | Method and apparatus for displaying skill control, device and medium | |
| HK40022247B (en) | Method, device, terminal, and storage medium for displaying interface information | |
| HK40048310A (en) | Virtual vehicle display method, device, equipment and storage medium | |
| CN118059490A (en) | Virtual object control method, device, computer equipment and storage medium | |
| HK40048310B (en) | Virtual vehicle display method, device, equipment and storage medium | |
| HK40037344B (en) | Method and device for controlling virtual prop, computer apparatus and storage medium | |
| CN118059495A (en) | Virtual object control method, device, equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination |