CN111857922A - A virtual element control method and device - Google Patents
A virtual element control method and device Download PDFInfo
- Publication number
- CN111857922A CN111857922A CN202010694264.7A CN202010694264A CN111857922A CN 111857922 A CN111857922 A CN 111857922A CN 202010694264 A CN202010694264 A CN 202010694264A CN 111857922 A CN111857922 A CN 111857922A
- Authority
- CN
- China
- Prior art keywords
- virtual
- target virtual
- curve
- virtual element
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 239000003550 marker Substances 0.000 claims abstract description 79
- 230000002452 interceptive effect Effects 0.000 claims abstract description 74
- 238000004364 calculation method Methods 0.000 claims abstract description 26
- 230000004044 response Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 9
- 230000003993 interaction Effects 0.000 abstract description 16
- 230000000694 effects Effects 0.000 abstract description 11
- 238000005516 engineering process Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 13
- 230000008569 process Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000008030 elimination Effects 0.000 description 2
- 238000003379 elimination reaction Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 230000004308 accommodation Effects 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 239000011324 bead Substances 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04847—Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/0485—Scrolling or panning
- G06F3/04855—Interaction with scrollbars
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本申请涉及动画技术领域,尤其涉及一种虚拟元素的控制方法及装置。通过响应订单界面中互动图标的触发操作,进入互动界面,响应针对互动界面中任一虚拟元素的滑动操作,控制该虚拟元素调整位置,响应至少两个目标虚拟元素之间的位置关系符合预设条件,以相同的曲线计算方式分别计算每个目标虚拟元素向虚拟进度标识移动的曲线移动路线,并控制每个目标虚拟元素沿着对应的曲线移动路线移动,以及调整虚拟进度标识的位置。基于上述方式,通过订单界面进入互动界面,可以增加用户与服务平台之间的互动,提升服务平台的资源利用率,另外,虚拟元素沿着曲线移动路线移动,在提升动画效果的同时,可以节约终端设备的计算资源。
The present application relates to the field of animation technology, and in particular, to a method and device for controlling virtual elements. By responding to the trigger operation of the interactive icon in the order interface, enter the interactive interface, respond to the sliding operation of any virtual element in the interactive interface, control the virtual element to adjust the position, and respond that the positional relationship between at least two target virtual elements conforms to the preset Condition, calculate the curve movement route of each target virtual element to the virtual progress marker in the same curve calculation method, and control each target virtual element to move along the corresponding curve movement route, and adjust the position of the virtual progress marker. Based on the above method, entering the interactive interface through the order interface can increase the interaction between the user and the service platform, and improve the resource utilization rate of the service platform. In addition, the virtual elements move along the curve movement route, which can improve the animation effect and save energy. The computing resources of the terminal device.
Description
技术领域technical field
本申请涉及动画技术领域,尤其涉及一种虚拟元素的控制方法及装置。The present application relates to the field of animation technology, and in particular, to a method and device for controlling virtual elements.
背景技术Background technique
目前,应用服务平台主要提供一些与平台业务相关的服务,比如,出行服务平台,主要提供有关出行业务的服务,用户在发起服务订单至订单结束前这段时间内,由于缺乏其他休闲服务,通常不会再关注该服务平台,这样,用户与应用服务平台之间缺乏互动,用户与应用服务平台之间的粘性较低,导致服务平台的资源利用率较低。At present, the application service platform mainly provides some services related to the platform business. For example, the travel service platform mainly provides services related to the travel business. During the period from the user initiating the service order to the end of the order, due to the lack of other leisure services, usually The service platform will no longer be paid attention to. In this way, there is a lack of interaction between the user and the application service platform, and the stickiness between the user and the application service platform is low, resulting in low resource utilization of the service platform.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请实施例至少提供一种虚拟元素的控制方法及装置,可以提升服务平台的资源利用率,而且在提升动画效果的同时,可以节约终端设备的计算资源。In view of this, the embodiments of the present application provide at least one virtual element control method and device, which can improve the resource utilization rate of the service platform, and can save the computing resources of the terminal device while improving the animation effect.
本申请主要包括以下几个方面:This application mainly includes the following aspects:
第一方面,本申请实施例提供一种虚拟元素的控制方法,应用于终端设备,所述控制方法包括:In a first aspect, an embodiment of the present application provides a method for controlling a virtual element, which is applied to a terminal device, and the control method includes:
响应在服务订单的订单界面中所展示的互动图标的触发操作,进入互动界面;所述互动界面中展示有虚拟进度标识和多个虚拟元素;In response to the trigger operation of the interactive icon displayed in the order interface of the service order, enter the interactive interface; the interactive interface displays a virtual progress mark and a plurality of virtual elements;
响应针对任一所述虚拟元素的滑动操作,控制所述虚拟元素调整位置;In response to a sliding operation for any of the virtual elements, controlling the virtual element to adjust the position;
响应所述多个虚拟元素中的至少两个目标虚拟元素之间的位置关系符合预设条件,以相同的曲线计算方式分别计算每个所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线;In response to the positional relationship between at least two target virtual elements in the plurality of virtual elements conforming to the preset condition, the curve movement of each target virtual element moving toward the virtual progress mark is calculated separately in the same curve calculation manner route;
控制每个所述目标虚拟元素沿着对应的曲线移动路线移动,并调整所述虚拟进度标识的位置。Each of the target virtual elements is controlled to move along the corresponding curve movement route, and the position of the virtual progress marker is adjusted.
在一种可能的实施方式中,所述预设条件包括:In a possible implementation, the preset conditions include:
所述多个虚拟元素中存在同种类型的至少两个目标虚拟元素相连。At least two target virtual elements of the same type are connected to each other in the plurality of virtual elements.
在一种可能的实施方式中,根据以下步骤计算每个所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线:In a possible implementation manner, a curved movement route of each target virtual element moving toward the virtual progress marker is calculated according to the following steps:
基于每个所述目标虚拟元素的第一坐标和所述虚拟进度标识的第二坐标,确定在所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的途经点的第三坐标;based on the first coordinate of each of the target virtual elements and the second coordinate of the virtual progress marker, determining the third coordinate of the waypoint of the curvilinear movement route between the target virtual element and the virtual progress marker;
基于所述目标虚拟元素的第一坐标、所述目标虚拟元素对应的途经点的第三坐标,以及所述虚拟进度标识的第二坐标,计算所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线。Based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker, calculate the movement of the target virtual element to the virtual progress marker. The curve moves the route.
在一种可能的实施方式中,所述基于每个所述目标虚拟元素的第一坐标和所述虚拟进度标识的第二坐标,确定在所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的途经点的第三坐标,包括:In a possible implementation manner, determining the distance between the target virtual element and the virtual progress indicator based on the first coordinate of each of the target virtual elements and the second coordinate of the virtual progress indicator The third coordinate of the waypoint of the curve movement route, including:
根据所述目标虚拟元素与所述虚拟进度标识之间的位置关系,确定所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线的曲线系数;According to the positional relationship between the target virtual element and the virtual progress marker, determine the curve coefficient of the curve movement route of the target virtual element moving to the virtual progress marker;
基于所述目标虚拟元素的第一坐标、所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的曲线系数,以及所述虚拟进度标识的第二坐标,确定在所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的途经点的第三坐标。Based on the first coordinate of the target virtual element, the curve coefficient of the curved movement route between the target virtual element and the virtual progress marker, and the second coordinate of the virtual progress marker, determine the position at the target virtual element The third coordinate of the waypoint of the curvilinear movement route between the virtual progress marker.
在一种可能的实施方式中,所述基于所述目标虚拟元素的第一坐标、所述目标虚拟元素对应的途经点的第三坐标,以及所述虚拟进度标识的第二坐标,计算所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线,包括:In a possible implementation manner, the calculation of the The curved movement route of the target virtual element moving toward the virtual progress marker, including:
根据所述目标虚拟元素的第一坐标、所述目标虚拟元素对应的途经点的第三坐标、所述虚拟进度标识的第二坐标,以及预设曲线公式,计算出所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的曲线参数;According to the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, the second coordinate of the virtual progress marker, and the preset curve formula, the relationship between the target virtual element and the target virtual element is calculated. Describe the curve parameters of the curve movement route between the virtual progress marks;
根据计算出的所述目标虚拟元素对应的曲线移动路线的曲线参数,以及所述预设曲线公式,计算所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线。According to the calculated curve parameters of the curve movement route corresponding to the target virtual element and the preset curve formula, the curve movement route of the target virtual element moving toward the virtual progress marker is calculated.
在一种可能的实施方式中,所述控制每个所述目标虚拟元素沿着对应的曲线移动路线移动,包括:In a possible implementation manner, the controlling each of the target virtual elements to move along a corresponding curve movement route includes:
控制相连的至少两个目标虚拟元素中各个所述目标虚拟元素,以预设速度同时沿着各自对应的曲线移动路线进行移动。Each of the at least two connected target virtual elements is controlled to move along the respective corresponding curved moving routes simultaneously at a preset speed.
在一种可能的实施方式中,所述调整所述虚拟进度标识的位置,包括:In a possible implementation manner, the adjusting the position of the virtual progress marker includes:
控制所述虚拟进度标识沿着预设路径前进预设距离。The virtual progress marker is controlled to advance a preset distance along a preset path.
在一种可能的实施方式中,在所述控制每个所述目标虚拟元素沿着对应的曲线移动路线移动,并调整所述虚拟进度标识的位置之后,所述控制方法还包括:In a possible implementation manner, after the controlling each of the target virtual elements to move along the corresponding curved moving route and adjusting the position of the virtual progress marker, the control method further includes:
确定所述虚拟进度标识所在位置是否为预设位置;Determine whether the location where the virtual progress marker is located is a preset location;
若是,向所述服务订单对应的账户发送虚拟资源。If so, send the virtual resource to the account corresponding to the service order.
在一种可能的实施方式中,所述虚拟资源包括以下资源中的至少一种:In a possible implementation, the virtual resource includes at least one of the following resources:
打折券;代金券;出行券。Discount coupons; vouchers; travel vouchers.
在一种可能的实施方式中,在所述至少两个目标虚拟元素均移动至所述虚拟进度标识之后,所述控制方法还包括:In a possible implementation manner, after the at least two target virtual elements are both moved to the virtual progress indicator, the control method further includes:
将相连的所述至少两个目标虚拟元素进行消除。The at least two connected target virtual elements are eliminated.
在一种可能的实施方式中,所述服务订单包括出行订单。In a possible implementation, the service order includes a travel order.
第二方面,本申请实施例还提供一种虚拟元素的控制装置,应用于终端设备,所述控制装置包括:In a second aspect, an embodiment of the present application further provides a control apparatus for a virtual element, which is applied to a terminal device, and the control apparatus includes:
展示模块,用于响应在服务订单的订单界面中所展示的互动图标的触发操作,进入互动界面;所述互动界面中展示有虚拟进度标识和多个虚拟元素;The display module is used to respond to the trigger operation of the interactive icon displayed in the order interface of the service order, and enter the interactive interface; the interactive interface displays a virtual progress mark and a plurality of virtual elements;
控制模块,用于响应针对任一所述虚拟元素的滑动操作,控制所述虚拟元素调整位置;a control module, configured to control the virtual element to adjust the position in response to a sliding operation for any of the virtual elements;
移动模块,用于响应所述多个虚拟元素中的至少两个目标虚拟元素之间的位置关系符合预设条件,以相同的曲线计算方式分别计算每个所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线;The moving module is configured to, in response to the positional relationship between at least two target virtual elements in the plurality of virtual elements meeting a preset condition, respectively calculate the progress of each target virtual element towards the virtual element in the same curve calculation manner Identify the curved movement route of the movement;
调整模块,用于控制每个所述目标虚拟元素沿着对应的曲线移动路线移动,并调整所述虚拟进度标识的位置。The adjustment module is configured to control each of the target virtual elements to move along the corresponding curve movement route, and to adjust the position of the virtual progress marker.
在一种可能的实施方式中,所述预设条件包括:In a possible implementation, the preset conditions include:
所述多个虚拟元素中存在同种类型的至少两个目标虚拟元素相连。At least two target virtual elements of the same type are connected to each other in the plurality of virtual elements.
在一种可能的实施方式中,所述移动模块包括:In a possible implementation, the moving module includes:
确定单元,用于基于每个所述目标虚拟元素的第一坐标和所述虚拟进度标识的第二坐标,确定在所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的途经点的第三坐标;A determination unit, configured to determine the waypoint of the curved movement route between the target virtual element and the virtual progress marker based on the first coordinate of each of the target virtual elements and the second coordinate of the virtual progress marker the third coordinate of ;
计算单元,用于基于所述目标虚拟元素的第一坐标、所述目标虚拟元素对应的途经点的第三坐标,以及所述虚拟进度标识的第二坐标,计算所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线。A calculation unit, configured to calculate the direction of the target virtual element to the The virtual progress identifies the curvilinear path of movement of the move.
在一种可能的实施方式中,所述确定单元,具体用于根据以下步骤确定途经点的第三坐标:In a possible implementation manner, the determining unit is specifically configured to determine the third coordinate of the waypoint according to the following steps:
根据所述目标虚拟元素与所述虚拟进度标识之间的位置关系,确定所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线的曲线系数;According to the positional relationship between the target virtual element and the virtual progress marker, determine the curve coefficient of the curve movement route of the target virtual element moving to the virtual progress marker;
基于所述目标虚拟元素的第一坐标、所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的曲线系数,以及所述虚拟进度标识的第二坐标,确定在所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的途经点的第三坐标。Based on the first coordinate of the target virtual element, the curve coefficient of the curved movement route between the target virtual element and the virtual progress marker, and the second coordinate of the virtual progress marker, determine the position at the target virtual element The third coordinate of the waypoint of the curvilinear movement route between the virtual progress marker.
在一种可能的实施方式中,所述计算单元,用于根据以下步骤计算所述曲线移动路线:In a possible implementation, the calculation unit is configured to calculate the curve movement route according to the following steps:
根据所述目标虚拟元素的第一坐标、所述目标虚拟元素对应的途经点的第三坐标、所述虚拟进度标识的第二坐标,以及预设曲线公式,计算出所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的曲线参数;According to the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, the second coordinate of the virtual progress marker, and the preset curve formula, the relationship between the target virtual element and the target virtual element is calculated. Describe the curve parameters of the curve movement route between the virtual progress marks;
根据计算出的所述目标虚拟元素对应的曲线移动路线的曲线参数,以及所述预设曲线公式,计算所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线。According to the calculated curve parameters of the curve movement route corresponding to the target virtual element and the preset curve formula, the curve movement route of the target virtual element moving toward the virtual progress marker is calculated.
在一种可能的实施方式中,所述调整模块,用于根据以下步骤调整所述虚拟进度标识的位置:In a possible implementation manner, the adjustment module is configured to adjust the position of the virtual progress marker according to the following steps:
控制相连的至少两个目标虚拟元素中各个所述目标虚拟元素,以预设速度同时沿着各自对应的曲线移动路线进行移动。Each of the at least two connected target virtual elements is controlled to move along the respective corresponding curved moving routes simultaneously at a preset speed.
在一种可能的实施方式中,所述调整模块用于:In a possible implementation, the adjustment module is used for:
控制所述虚拟进度标识沿着预设路径前进预设距离。The virtual progress marker is controlled to advance a preset distance along a preset path.
在一种可能的实施方式中,所述控制装置还包括:In a possible implementation, the control device further includes:
确定模块,用于确定所述虚拟进度标识所在位置是否为预设位置;A determination module, for determining whether the location of the virtual progress mark is a preset location;
发送模块,用于若是,向所述服务订单对应的账户发送虚拟资源。A sending module, configured to send virtual resources to the account corresponding to the service order if yes.
在一种可能的实施方式中,所述虚拟资源包括以下资源中的至少一种:In a possible implementation, the virtual resource includes at least one of the following resources:
打折券;代金券;出行券。Discount coupons; vouchers; travel vouchers.
在一种可能的实施方式中,所述调整模块还用于:In a possible implementation manner, the adjustment module is further used for:
将相连的所述至少两个目标虚拟元素进行消除。The at least two connected target virtual elements are eliminated.
在一种可能的实施方式中,所述服务订单包括出行订单。In a possible implementation, the service order includes a travel order.
第三方面,本申请实施例还提供一种电子设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述处理器与所述存储器之间通过所述总线进行通信,所述机器可读指令被所述处理器运行时执行上述第一方面或第一方面中任一种可能的实施方式中所述的虚拟元素的控制方法的步骤。In a third aspect, embodiments of the present application further provide an electronic device, including: a processor, a memory, and a bus, where the memory stores machine-readable instructions executable by the processor, and when the electronic device runs, the processing Communication between the processor and the memory is performed through the bus, and the machine-readable instructions are executed by the processor to execute the virtual elements described in the first aspect or any possible implementation manner of the first aspect steps of the control method.
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器运行时执行上述第一方面或第一方面中任一种可能的实施方式中所述的虚拟元素的控制方法的步骤。In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program executes the first aspect or the first aspect when the computer program is run by a processor The steps of the virtual element control method described in any one of the possible implementation manners.
本申请实施例提供的虚拟元素的控制方法及置,在服务订单的订单界面中设置有互动图标,进而在触发互动图标时,可以进入互动界面,与现有技术中的应用服务平台缺乏其他类型的服务,导致用户与应用服务平台之间缺乏互动相比,本申请可以增加用户与服务平台之间的互动,提升服务平台的资源利用率,另外,与现有技术中的虚拟元素按固定的线路移动相比,本申请的虚拟元素沿着曲线移动路线移动,可以提升动画效果,并且是以相同的曲线计算方式分别计算的每个目标虚拟元素对应的曲线移动路线,可以减少计算曲线移动路线的计算量,进而,可以节约终端设备的计算资源。In the method and device for controlling virtual elements provided by the embodiments of the present application, an interactive icon is set in the order interface of a service order, and when the interactive icon is triggered, the interactive interface can be entered, which lacks other types of application service platforms in the prior art. Compared with the lack of interaction between the user and the application service platform, the present application can increase the interaction between the user and the service platform, and improve the resource utilization rate of the service platform. Compared with line movement, the virtual element of the present application moves along the curve movement route, which can improve the animation effect, and the curve movement route corresponding to each target virtual element is calculated separately in the same curve calculation method, which can reduce the calculation of the curve movement route. The calculation amount of the terminal device can be saved, and the computing resources of the terminal device can be saved.
进一步,本申请实施例提供的虚拟元素的控制方法,基于每个目标虚拟元素的第一坐标和虚拟进度标识的第二坐标,确定在目标虚拟元素与虚拟进度标识之间的曲线移动路线的途经点的第三坐标,进而,基于目标虚拟元素的第一坐标、目标虚拟元素对应的途经点的第三坐标,以及虚拟进度标识的第二坐标,计算目标虚拟元素向虚拟进度标识移动的曲线移动路线。基于上述方式,绘制曲线移动路线所需的三个点皆依赖于用户的输入与用户行为数据,随着用户的输入随时动态变化,可以保证虚拟元素移动的动态效果,可以提升用户与终端设备之间的交互程度。Further, the control method of the virtual element provided by the embodiment of the present application, based on the first coordinate of each target virtual element and the second coordinate of the virtual progress mark, to determine the path of the curved movement route between the target virtual element and the virtual progress mark The third coordinate of the point, and then, based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress mark, calculate the curve movement of the target virtual element moving to the virtual progress mark route. Based on the above method, the three points required to draw the curve movement route all depend on the user's input and user behavior data. With the dynamic change of the user's input at any time, the dynamic effect of the virtual element movement can be guaranteed, and the relationship between the user and the terminal device can be improved. degree of interaction between them.
为使本申请的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the preferred embodiments are exemplified below, and are described in detail as follows in conjunction with the accompanying drawings.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present application more clearly, the following drawings will briefly introduce the drawings that need to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore do not It should be regarded as a limitation of the scope, and for those of ordinary skill in the art, other related drawings can also be obtained according to these drawings without any creative effort.
图1示出了本申请实施例所提供的一种虚拟元素的控制方法的流程图;1 shows a flowchart of a method for controlling a virtual element provided by an embodiment of the present application;
图2a示出了本申请具体实施例所提供的虚拟元素移动至虚拟进度标识之前的互动界面示意图;Figure 2a shows a schematic diagram of an interactive interface before the virtual element provided by the specific embodiment of the present application is moved to the virtual progress indicator;
图2b示出了本申请具体实施例所提供的虚拟元素移动至虚拟进度标识之后的互动界面示意图;Fig. 2b shows a schematic diagram of an interactive interface after the virtual element provided by the specific embodiment of the present application is moved to the virtual progress indicator;
图3示出了本申请实施例所提供的一种虚拟元素的控制装置的功能模块图之一;FIG. 3 shows one of the functional block diagrams of a virtual element control device provided by an embodiment of the present application;
图4示出了本申请实施例所提供的移动模块的功能模块图;FIG. 4 shows a functional module diagram of a mobile module provided by an embodiment of the present application;
图5示出了本申请实施例所提供的一种虚拟元素的控制装置的功能模块图之二;FIG. 5 shows the second functional module diagram of a virtual element control device provided by an embodiment of the present application;
图6示出了本申请实施例所提供的一种电子设备的结构示意图。FIG. 6 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application.
主要元件符号说明:Description of main component symbols:
图中:300-虚拟元素的控制装置;310-展示模块;320-控制模块;330-移动模块;331-确定单元;332-计算单元;340-调整模块;350-确定模块;360-发送模块;600-电子设备;610-处理器;620-存储器;630-总线。In the figure: 300-control device of virtual elements; 310-display module; 320-control module; 330-movement module; 331-determination unit; 332-calculation unit; 340-adjustment module; 350-determination module; ; 600 - Electronics; 610 - Processor; 620 - Memory; 630 - Bus.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,应当理解,本申请中的附图仅起到说明和描述的目的,并不用于限定本申请的保护范围。另外,应当理解,示意性的附图并未按实物比例绘制。本申请中使用的流程图示出了根据本申请的一些实施例实现的操作。应当理解,流程图的操作可以不按顺序实现,没有逻辑的上下文关系的步骤可以反转顺序或者同时实施。此外,本领域技术人员在本申请内容的指引下,可以向流程图添加一个或多个其他操作,也可以从流程图中移除一个或多个操作。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. It should be understood that the The accompanying drawings are only for the purpose of illustration and description, and are not used to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented in accordance with some embodiments of the application. It should be understood that the operations of the flowcharts may be performed out of order and that steps without logical context may be performed in reverse order or concurrently. In addition, those skilled in the art can add one or more other operations to the flowchart, and can also remove one or more operations from the flowchart under the guidance of the content of the present application.
另外,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的全部其他实施例,都属于本申请保护的范围。In addition, the described embodiments are only some of the embodiments of the present application, but not all of the embodiments. The components of the embodiments of the present application generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. Thus, the following detailed description of the embodiments of the application provided in the accompanying drawings is not intended to limit the scope of the application as claimed, but is merely representative of selected embodiments of the application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.
为了使得本领域技术人员能够使用本申请内容,结合特定应用场景“控制虚拟元素”,给出以下实施方式,对于本领域技术人员来说,在不脱离本申请的精神和范围的情况下,可以将这里定义的一般原理应用于其他实施例和应用场景。In order to enable those skilled in the art to use the content of the present application, in combination with a specific application scenario "controlling virtual elements", the following embodiments are given. For those skilled in the art, without departing from the spirit and scope of the present application, they can Apply the general principles defined herein to other embodiments and application scenarios.
本申请实施例下述方法、装置、电子设备或计算机可读存储介质可以应用于任何需要进行控制虚拟元素的场景,本申请实施例并不对具体的应用场景作限制,任何使用本申请实施例提供的虚拟元素的控制方法及装置的方案均在本申请保护范围内。The following methods, apparatuses, electronic devices, or computer-readable storage media in the embodiments of the present application can be applied to any scenario where virtual elements need to be controlled. The embodiments of the present application do not limit the specific application scenarios. The solutions of the control method and device of the virtual element are all within the protection scope of the present application.
值得注意的是,在本申请提出之前,应用服务平台主要提供一些与平台业务相关的服务,比如,出行服务平台,主要提供有关出行业务的服务,用户在发起服务订单后,由于缺乏其他休闲服务,通常不会再关注该服务平台,这样,用户与应用服务平台之间缺乏互动,导致用户与应用服务平台之间的粘性较低。It is worth noting that before this application was filed, the application service platform mainly provided some services related to the platform business. For example, the travel service platform mainly provided services related to the travel business. After the user initiated the service order, due to the lack of other leisure services , usually no longer pay attention to the service platform, so that there is a lack of interaction between users and the application service platform, resulting in low stickiness between users and the application service platform.
另外,在游戏中,虚拟元素的移动轨迹通常是固定的,比较呆板,比如在消除类游戏中,消除虚拟元素时,不同虚拟元素的移动轨迹固定,产生的动画效果不佳。In addition, in games, the movement trajectories of virtual elements are usually fixed and relatively rigid. For example, in elimination games, when virtual elements are eliminated, the movement trajectories of different virtual elements are fixed, resulting in poor animation effects.
针对上述问题,本申请实施例通过响应订单界面中互动图标的触发操作,进入互动界面,响应针对互动界面中任一虚拟元素的滑动操作,控制该虚拟元素调整位置,响应至少两个目标虚拟元素之间的位置关系符合预设条件,以相同的曲线计算方式分别计算每个目标虚拟元素向虚拟进度标识移动的曲线移动路线,并控制每个目标虚拟元素沿着对应的曲线移动路线移动,以及调整虚拟进度标识的位置。基于上述方式,通过订单界面进入互动界面,可以增加用户与服务平台之间的互动,提升服务平台的资源利用率,另外,虚拟元素沿着曲线移动路线移动,在提升动画效果的同时,可以节约终端设备的计算资源。In view of the above problems, the embodiment of the present application enters the interactive interface by responding to the trigger operation of the interactive icon in the order interface, responds to the sliding operation on any virtual element in the interactive interface, controls the virtual element to adjust the position, and responds to at least two target virtual elements The positional relationship between them conforms to the preset condition, and the curve movement route of each target virtual element moving toward the virtual progress marker is calculated in the same curve calculation method, and each target virtual element is controlled to move along the corresponding curve movement route, and Adjust the position of the virtual progress indicator. Based on the above method, entering the interactive interface through the order interface can increase the interaction between the user and the service platform, and improve the resource utilization rate of the service platform. In addition, the virtual elements move along the curve movement route, which can improve the animation effect and save energy. The computing resources of the terminal device.
需要说明的是,终端设备包括但不限于移动终端、个人电脑(Personal Computer,PC)、平板电脑。It should be noted that the terminal device includes but is not limited to a mobile terminal, a personal computer (Personal Computer, PC), and a tablet computer.
为便于对本申请进行理解,下面结合具体实施例对本申请提供的技术方案进行详细说明。In order to facilitate the understanding of the present application, the technical solutions provided by the present application will be described in detail below with reference to specific embodiments.
图1为本申请实施例所提供的一种虚拟元素的控制方法的流程图。如图1所示,本申请实施例提供的虚拟元素的控制方法,应用于终端设备,包括以下步骤:FIG. 1 is a flowchart of a method for controlling a virtual element provided by an embodiment of the present application. As shown in FIG. 1 , the method for controlling a virtual element provided by an embodiment of the present application, applied to a terminal device, includes the following steps:
S101:响应在服务订单的订单界面中所展示的互动图标的触发操作,进入互动界面;所述互动界面中展示有虚拟进度标识和多个虚拟元素。S101: In response to the triggering operation of the interactive icon displayed in the order interface of the service order, enter the interactive interface; the interactive interface displays a virtual progress mark and a plurality of virtual elements.
在具体实施中,在检测到服务订单的订单界面中所展示的互动图标被触发时,从订单界面跳转至互动界面,具体地,用户在查看服务订单的订单界面时,看到订单界面上展示的互动图标,可以通过点击互动图标,使终端设备将订单界面跳转至互动界面,进而,用户可以在互动界面操作虚拟元素,实现用户与服务平台之间的互动,以提升服务平台的资源利用率。In a specific implementation, when it is detected that the interactive icon displayed in the order interface of the service order is triggered, the user jumps from the order interface to the interactive interface. The displayed interactive icon can make the terminal device jump from the order interface to the interactive interface by clicking on the interactive icon. Then, the user can operate the virtual elements on the interactive interface to realize the interaction between the user and the service platform, so as to improve the resources of the service platform. utilization.
这里,服务订单可以为各种服务的订单,比如出行服务订单、住宿服务订单、餐饮服务订单等。订单界面可以为订单完成的界面,也可以是订单进行中的界面,比如,出行服务订单的订单界面,可以将互动图标展示在未完成订单的订单界面上,这样,用户在旅途中,可以通过操作互动界面上的虚拟元素打发时间,实现用户与应用服务平台的交互;也可以将互动图标展示在完成订单的订单界面上,用户通过操作互动界面上的虚拟元素来获得虚拟资源,比如奖励。Here, the service order may be an order of various services, such as a travel service order, an accommodation service order, a catering service order, and the like. The order interface can be an interface for order completion or an interface in progress. For example, in the order interface for travel service orders, interactive icons can be displayed on the order interface for uncompleted orders. Operate the virtual elements on the interactive interface to pass the time and realize the interaction between the user and the application service platform; interactive icons can also be displayed on the order interface for completing the order, and users can obtain virtual resources by operating the virtual elements on the interactive interface, such as rewards.
其中,互动界面中展示有虚拟进度标识和多个虚拟元素,这里,多个虚拟元素可以为不同类型的虚拟元素;虚拟进度标识用于表示互动的进程。The interactive interface displays a virtual progress mark and multiple virtual elements. Here, the multiple virtual elements may be different types of virtual elements; the virtual progress mark is used to represent the interactive process.
S102:响应针对任一所述虚拟元素的滑动操作,控制所述虚拟元素调整位置。S102: In response to a sliding operation on any of the virtual elements, control the virtual element to adjust the position.
在具体实施中,用户可以对互动界面中展示的虚拟元素进行滑动,终端设备在检测到展示的任一虚拟元素被滑动时,根据虚拟元素滑动的位置,来控制调整虚拟元素的位置,比如,第一虚拟元素滑动至第二虚拟元素的位置,将第一虚拟元素的位置和第二虚拟元素的位置进行替换,即,第一虚拟元素移动至第二虚拟元素的位置,同样,第二虚拟元素移动至第一虚拟元素的位置。In a specific implementation, the user can slide the virtual element displayed in the interactive interface, and when the terminal device detects that any virtual element displayed is slid, it controls and adjusts the position of the virtual element according to the sliding position of the virtual element, for example, The first virtual element slides to the position of the second virtual element, and the position of the first virtual element and the position of the second virtual element are replaced, that is, the first virtual element is moved to the position of the second virtual element. Similarly, the second virtual element is moved to the position of the second virtual element. The element is moved to the position of the first virtual element.
S103:响应所述多个虚拟元素中的至少两个目标虚拟元素之间的位置关系符合预设条件,以相同的曲线计算方式分别计算每个所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线。S103: In response to the positional relationship between at least two target virtual elements in the plurality of virtual elements meeting a preset condition, calculate the movement of each target virtual element to the virtual progress indicator in the same curve calculation manner. The curve moves the route.
在具体实施中,在用户滑动虚拟元素后,检测展示的多个虚拟元素中是否存在至少两个目标虚拟元素之间的位置关系符合预设条件,若存在,响应该至少两个目标虚拟元素之间的位置关系符合预设条件,以相同的曲线计算方式分别计算每个目标虚拟元素与虚拟进度标识之间的曲线移动路线,每个目标虚拟元素可以沿着自身对应的曲线移动路线移动至虚拟进度标识所在的位置处。In a specific implementation, after the user slides the virtual element, it is detected whether the positional relationship between at least two target virtual elements in the displayed plurality of virtual elements meets the preset condition, and if there is, a response to the relationship between the at least two target virtual elements is performed. The positional relationship between them meets the preset conditions, and the curve movement route between each target virtual element and the virtual progress mark is calculated in the same curve calculation method, and each target virtual element can move along its corresponding curve movement route to the virtual Where the progress indicator is located.
这里,每个目标虚拟元素沿着计算出的曲线移动路线进行移动,与虚拟元素只按固定线路移动相比,可以提升动画效果,由于本申请中各个目标虚拟元素对应的曲线移动路线的计算方式相同,可以降低计算曲线移动路线的计算量,从而节约终端设备的计算资源。其中,曲线移动路线可以为贝塞尔曲线,贝塞尔曲线,又称贝兹曲线或贝济埃曲线,是应用于二维图形应用程序的数学曲线。Here, each target virtual element moves along the calculated curve movement route, which can improve the animation effect compared with the virtual element only moving along the fixed route. Because of the calculation method of the curve movement route corresponding to each target virtual element in this application Similarly, the calculation amount for calculating the moving route of the curve can be reduced, thereby saving the computing resources of the terminal device. The moving route of the curve may be a Bezier curve, and a Bezier curve, also known as a Bezier curve or a Bezier curve, is a mathematical curve applied to a two-dimensional graphics application.
可选地,预设条件为展示的多个虚拟元素中存在同种类型的至少两个目标虚拟元素相连,比如,在检测到同种类型的三个目标虚拟元素相连时,采用将相连的三个目标虚拟元素移动至虚拟进度标识处进行消除。Optionally, the preset condition is that there are at least two target virtual elements of the same type in the displayed multiple virtual elements that are connected. For example, when it is detected that three target virtual elements of the same type are connected, the A target virtual element is moved to the virtual progress marker for elimination.
可选地,在检测到展示的多个虚拟元素中的至少两个目标虚拟元素之间的位置关系符合预设条件时,先计算出每个目标虚拟元素向虚拟进度标识移动的曲线移动路线,具体地,针对任一目标虚拟元素,以该目标虚拟元素作为起点、虚拟进度标识作为终点,并找到起点和终点之间的途经点,进而,根据起点、途经点、终点计算出从该目标虚拟元素所在的位置、经过途经点所在的位置达到虚拟进度标识所在位置的曲线移动路径,也即,步骤S103中根据以下步骤计算每个所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线:Optionally, when it is detected that the positional relationship between at least two target virtual elements among the displayed multiple virtual elements meets a preset condition, first calculate a curved movement route of each target virtual element moving to the virtual progress mark, Specifically, for any target virtual element, take the target virtual element as the starting point and the virtual progress mark as the end point, and find the waypoint between the start point and the end point, and then, according to the starting point, the waypoint, and the end point, calculate the distance from the target virtual element The position of the element and the position of the via point to reach the curve movement path of the virtual progress mark, that is, in step S103, the curve movement path of each of the target virtual elements moving to the virtual progress mark is calculated according to the following steps :
步骤1031:基于每个所述目标虚拟元素的第一坐标和所述虚拟进度标识的第二坐标,确定在所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的途经点的第三坐标。Step 1031: Based on the first coordinate of each of the target virtual elements and the second coordinate of the virtual progress marker, determine the first point of the waypoint of the curvilinear movement route between the target virtual element and the virtual progress marker. Three coordinates.
在具体实施中,针对任一目标虚拟元素,确定该目标虚拟元素的第一坐标和虚拟进度标识当前的第二坐标,进而,根据该目标虚拟元素的第一坐标和虚拟进度标识的第二坐标,计算出在该目标虚拟元素与虚拟进度标识之间的曲线移动路线的途经点的第三坐标。In a specific implementation, for any target virtual element, the first coordinate of the target virtual element and the current second coordinate of the virtual progress mark are determined, and then, according to the first coordinate of the target virtual element and the second coordinate of the virtual progress mark , and calculate the third coordinate of the waypoint of the curvilinear moving route between the target virtual element and the virtual progress marker.
可选地,步骤1031中基于每个所述目标虚拟元素的第一坐标和所述虚拟进度标识的第二坐标,确定在所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的途经点的第三坐标,包括以下步骤:Optionally, in step 1031, based on the first coordinate of each of the target virtual elements and the second coordinate of the virtual progress marker, determine the position of the curve movement route between the target virtual element and the virtual progress marker. The third coordinate of the waypoint, including the following steps:
根据所述目标虚拟元素与所述虚拟进度标识之间的位置关系,确定所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线的曲线系数;基于所述目标虚拟元素的第一坐标、所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的曲线系数,以及所述虚拟进度标识的第二坐标,确定在所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的途经点的第三坐标。According to the positional relationship between the target virtual element and the virtual progress marker, determine the curve coefficient of the curve movement route of the target virtual element to the virtual progress marker; based on the first coordinates of the target virtual element, The curve coefficient of the curve movement route between the target virtual element and the virtual progress marker, and the second coordinate of the virtual progress marker, determine the curve movement between the target virtual element and the virtual progress marker The third coordinate of the route's waypoint.
在具体实施中,在计算一个目标虚拟元素与虚拟进度标识之间的曲线移动路线的途经点的第三坐标时,可以先确定目标虚拟元素与虚拟进度是之间的位置关系,进而,根据该位置关系确定曲线方向,由曲线方向来确定该目标虚拟元素向虚拟进度标识移动的曲线移动路线的曲线系数,进一步地,基于目标虚拟元素的第一坐标。目标虚拟元素与虚拟进度标识之间的曲线移动路线的曲线系数,以及虚拟进度标识的第二坐标,来共同确定在目标虚拟元素与虚拟进度标识之间的曲线移动路线的途经点的第三坐标。In a specific implementation, when calculating the third coordinate of the waypoint of the curved movement route between a target virtual element and the virtual progress mark, the positional relationship between the target virtual element and the virtual progress can be determined first, and then, according to the The position relationship determines the curve direction, and the curve direction determines the curve coefficient of the curve movement route of the target virtual element moving toward the virtual progress mark, further, based on the first coordinate of the target virtual element. The curve coefficient of the curved movement route between the target virtual element and the virtual progress mark, and the second coordinate of the virtual progress mark, to jointly determine the third coordinate of the waypoint of the curvilinear movement route between the target virtual element and the virtual progress mark .
一示例中,目标虚拟元素P1(xp1,yp1)为起点、虚拟进度标识P2(xp2,yp2)为终点,计算在P1和P2之间的曲线移动路线上的途经点P3(xp3,yp3)的坐标时,先确定P1点与P2点之间的位置关系,若P2在P1的左边,即xp2≤xp1,则P1向P2移动的曲线移动路线的曲线系数K=a;若P2在P1的右边,即xp2>xp1,则P1向P2移动的曲线移动路线的曲线系数K=b;其中,a和b均为常数,a<0,b>0。其中,P3点的计算公式可以为:xp3=(xp1-xp2)/3+K;yp3=(yp1-yp2)*(2/3)+yp2,这样,计算出目标虚拟元素P1与虚拟进度标识P2之间的曲线移动路线的途经点P3。In an example, the target virtual element P1(x p1 , y p1 ) is the starting point, the virtual progress marker P2(x p2 , y p2 ) is the ending point, and the passing point P3(x p3 , y p3 ), first determine the positional relationship between point P1 and point P2, if P2 is to the left of P1, that is, x p2 ≤x p1 , then the curve coefficient K= a; if P2 is on the right side of P1, that is, x p2 >x p1 , then the curve coefficient K=b of the curve moving route from P1 to P2; where a and b are both constants, a<0, b>0. Among them, the calculation formula of point P3 can be: x p3 =(x p1 -x p2 )/3+K; y p3 =(y p1 -y p2 )*(2/3)+y p2 , in this way, the target is calculated The waypoint P3 of the curvilinear movement route between the virtual element P1 and the virtual progress indicator P2.
步骤1032:基于所述目标虚拟元素的第一坐标、所述目标虚拟元素对应的途经点的第三坐标,以及所述虚拟进度标识的第二坐标,计算所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线。Step 1032: Based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress indicator, calculate the direction of the virtual progress from the target virtual element to the virtual progress. Identifies the curved movement path of the movement.
在具体实施中,基于该目标虚拟元素的第一坐标、该目标虚拟元素对应的途经点的第三坐标,以及虚拟进度标识的第二坐标,可以直接计算出该目标虚拟元素向虚拟进度标识移动的曲线移动路线,这里,展示的多个虚拟元素中的至少两个目标虚拟元素中的每个目标虚拟元素,每个目标虚拟元素对应的曲线移动路线均按照上述曲线计算方式进行计算。In a specific implementation, based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker, it can be directly calculated that the target virtual element moves to the virtual progress marker Here, for each target virtual element in at least two target virtual elements among the displayed multiple virtual elements, the curve movement path corresponding to each target virtual element is calculated according to the above curve calculation method.
需要说明的是,在一些交互式的界面或游戏的设计中,虚拟元素的曲线移动路线可以随着用户的输入进行动态变化,这样,可以给用户及时、丰富、动态变化的反馈体验、互动体验。对于本申请,起点(目标虚拟元素)的坐标由用户滑动操作后的位置决定,终点(虚拟进度条)则由用户之前的交互于数据积累计算所得,即,随着目标虚拟元素移动至虚拟进度标识,虚拟进度标识的位置也随着发送变化,而途经点的坐标则由起点、终点的坐标计算所得。即,用户通过操作,致使交互界面中的元素运动所遵循的曲线轨迹,其起点、终点、途经点皆依赖用户的输入,实时动态计算所得,由于增加了交互环节,可以提升用户与服务平台之间的粘性,提升用户的感受度。It should be noted that in the design of some interactive interfaces or games, the curve movement route of the virtual elements can be dynamically changed with the user's input, so that the user can be given timely, rich and dynamically changing feedback experience and interactive experience. . For this application, the coordinates of the starting point (target virtual element) are determined by the position after the user's sliding operation, and the ending point (virtual progress bar) is calculated by the user's previous interaction and data accumulation, that is, as the target virtual element moves to the virtual progress The position of the virtual progress mark also changes with the sending, and the coordinates of the waypoint are calculated from the coordinates of the starting point and the ending point. That is, the user's operation causes the movement of the elements in the interactive interface to follow the curve trajectory. Its starting point, ending point, and waypoint all depend on the user's input, and are dynamically calculated in real time. Due to the addition of interactive links, the relationship between the user and the service platform can be improved. The stickiness between them can improve the user's experience.
可选地,步骤1032中基于所述目标虚拟元素的第一坐标、所述目标虚拟元素对应的途经点的第三坐标,以及所述虚拟进度标识的第二坐标,计算所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线,包括以下步骤:Optionally, in step 1032, based on the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker, calculate the direction of the target virtual element. The virtual progress marks the moving curve movement route, including the following steps:
根据所述目标虚拟元素的第一坐标、所述目标虚拟元素对应的途经点的第三坐标、所述虚拟进度标识的第二坐标,以及预设曲线公式,计算出所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的曲线参数;根据计算出的所述目标虚拟元素对应的曲线移动路线的曲线参数,以及所述预设曲线公式,计算所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线。According to the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, the second coordinate of the virtual progress marker, and the preset curve formula, the relationship between the target virtual element and the target virtual element is calculated. curve parameters of the curve movement route between the virtual progress markers; according to the calculated curve parameters of the curve movement route corresponding to the target virtual element and the preset curve formula, calculate the direction of the target virtual element to the virtual The progress identifies the curvilinear path of the move.
在具体实施中,在计算出目标虚拟元素对应的途经点的第三坐标之后,可以根据目标虚拟元素的第一坐标、目标虚拟元素对应的途经点的第三坐标、虚拟进度标识的第二坐标,以及预设曲线公式,计算出目标虚拟元素与虚拟进度标识之间的曲线移动路线的曲线参数,这里,预设曲线公式用于限制各个目标虚拟元素对应的曲线移动路线保持一致,比如,预设曲线公式为贝塞尔曲线公式,这样,将目标虚拟元素的第一坐标、虚拟进度标识的第二坐标、目标虚拟元素对应的途经点的第三坐标带入预设曲线公式,可以计算出目标虚拟元素对应的曲线移动路线的曲线参数,进而计算得到目标虚拟元素向虚拟进度标识移动的曲线移动路线。In a specific implementation, after calculating the third coordinate of the waypoint corresponding to the target virtual element, the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, and the second coordinate of the virtual progress marker , and the preset curve formula to calculate the curve parameters of the curve movement route between the target virtual element and the virtual progress mark. Here, the preset curve formula is used to limit the curve movement route corresponding to each target virtual element to be consistent. Let the curve formula be a Bezier curve formula, so that the first coordinate of the target virtual element, the second coordinate of the virtual progress mark, and the third coordinate of the waypoint corresponding to the target virtual element are brought into the preset curve formula, and can be calculated. The curve parameters of the curve movement route corresponding to the target virtual element are further calculated to obtain the curve movement route of the target virtual element moving to the virtual progress mark.
S104:控制每个所述目标虚拟元素沿着对应的曲线移动路线移动,并调整所述虚拟进度标识的位置。S104: Control each of the target virtual elements to move along a corresponding curve movement route, and adjust the position of the virtual progress marker.
在具体实施中,在检测到互动界面中展示的多个虚拟元素中的至少两个目标虚拟元素之间的位置关系符合预设条件时,控制该至少两个目标虚拟元素中的每个目标虚拟元素沿着计算出的对应的曲线移动路线移动,当该至少两个目标虚拟元素均移动至虚拟进度标识所在位置后,调整虚拟进度标识的位置。In a specific implementation, when it is detected that the positional relationship between at least two target virtual elements among the plurality of virtual elements displayed in the interactive interface meets a preset condition, control each target virtual element in the at least two target virtual elements The element moves along the calculated corresponding curve movement route, and when the at least two target virtual elements move to the position of the virtual progress mark, the position of the virtual progress mark is adjusted.
可选地,步骤S104中控制每个所述目标虚拟元素沿着对应的曲线移动路线移动,包括以下步骤:Optionally, in step S104, controlling each of the target virtual elements to move along a corresponding curve movement route, including the following steps:
控制相连的至少两个目标虚拟元素中各个所述目标虚拟元素,以预设速度同时沿着各自对应的曲线移动路线进行移动。Each of the at least two connected target virtual elements is controlled to move along the respective corresponding curved moving routes simultaneously at a preset speed.
在具体实施中,可以在检测到互动界面中展示的多个虚拟元素中至少两个目标虚拟元素之间的位置关系符合预设条件时,这里,预设条件为该至少两个目标虚拟元素相连,且该至少两个目标虚拟元素中的各个目标虚拟元素为同种类型,此时,控制相连的该至少两个目标虚拟元素中的各个目标虚拟元素均以预设速度同时沿着各自对应的曲线移动路线进行移动。In a specific implementation, when it is detected that the positional relationship between at least two target virtual elements among the plurality of virtual elements displayed in the interactive interface meets a preset condition, here, the preset condition is that the at least two target virtual elements are connected , and each target virtual element in the at least two target virtual elements is of the same type, at this time, each target virtual element in the at least two connected target virtual elements is controlled to simultaneously move along the respective corresponding virtual elements at a preset speed. The curve moves the route to move.
这里,步骤S104中调整所述虚拟进度标识的位置,包括:Here, adjusting the position of the virtual progress marker in step S104 includes:
控制所述虚拟进度标识沿着预设路径前进预设距离。The virtual progress marker is controlled to advance a preset distance along a preset path.
在具体实施中,虚拟进度标识用于表示互动的进程,每次有至少两个目标虚拟元素之间的位置关系符合预设条件,在该至少两个目标虚拟元素移动至虚拟进度标识处时,虚拟进度标识会沿着预设路径前进预设距离。In a specific implementation, the virtual progress marker is used to represent the process of interaction, and every time the positional relationship between at least two target virtual elements meets the preset condition, when the at least two target virtual elements move to the virtual progress marker, The virtual progress indicator will advance a preset distance along a preset path.
可选地,在每次调整虚拟进度标识的位置后,需要检测虚拟进度标识当前所在的位置是否到达预设位置,若是,可以向服务订单对应的账户发送虚拟资源作为奖励,也即,在步骤S104所述控制每个所述目标虚拟元素沿着对应的曲线移动路线移动,并调整所述虚拟进度标识的位置之后,还包括以下步骤:Optionally, after each adjustment of the position of the virtual progress mark, it is necessary to detect whether the current position of the virtual progress mark reaches the preset position, and if so, virtual resources can be sent to the account corresponding to the service order as a reward, that is, in step After controlling each of the target virtual elements to move along the corresponding curve movement route and adjusting the position of the virtual progress marker in S104, the following steps are also included:
确定所述虚拟进度标识所在位置是否为预设位置;若是,向所述服务订单对应的账户发送虚拟资源。Determine whether the location of the virtual progress identifier is a preset location; if so, send virtual resources to the account corresponding to the service order.
在具体实施中,在每次调整虚拟进度标识的位置后,检测虚拟进度标识当前所在的位置是否到达预设位置,具体地,可以在互动界面上设置进度终点标识,即,检测虚拟进度标识是否移动至进度终点标识处,若是,可以向服务订单对应的账户发送虚拟资源,这里,虚拟资源作为奖励发送给用户;若否,继续检测展示的多个虚拟资源中是否存在至少两个目标虚拟元素之间的位置关系满足预设条件。In a specific implementation, after each adjustment of the position of the virtual progress mark, it is detected whether the current position of the virtual progress mark reaches a preset position. Specifically, a progress end mark can be set on the interactive interface, that is, it is detected whether the virtual progress mark is Move to the progress end marker. If yes, you can send virtual resources to the account corresponding to the service order. Here, the virtual resources are sent to the user as rewards; if not, continue to detect whether there are at least two target virtual elements in the displayed multiple virtual resources The positional relationship between them satisfies the preset condition.
这里,虚拟资源包括以下资源中的至少一种:打折券;代金券;出行券。Here, the virtual resources include at least one of the following resources: discount coupons; vouchers; travel coupons.
在具体实施中,当用户在互动界面上操作虚拟元素,使虚拟进度标识到达预设位置,即,可以理解为用户闯关成功、用户完成任务,进而,向当前服务订单对应的账户发送虚拟资源作为奖励,通常,虚拟资源为与服务订单对应的服务业务相关的奖励,比如打折券、代金券、出行券。这样,可以增加用户与服务平台之间的互动,提升用户与服务平台之间的粘性,进而提升服务平台的资源利用率。In the specific implementation, when the user operates the virtual element on the interactive interface, so that the virtual progress indicator reaches the preset position, that is, it can be understood that the user successfully passes the level and the user completes the task, and then the virtual resource is sent to the account corresponding to the current service order as a Rewards, generally, virtual resources are rewards related to the service business corresponding to the service order, such as discount coupons, cash coupons, and travel coupons. In this way, the interaction between the user and the service platform can be increased, the stickiness between the user and the service platform can be improved, and the resource utilization rate of the service platform can be improved.
这里,在互动界面展示的多个虚拟元素中满足预设条件的至少两个目标虚拟元素均移动至虚拟进度标识之后,将相连的至少两个目标虚拟元素进行消除。Here, after the at least two target virtual elements that satisfy the preset condition among the plurality of virtual elements displayed on the interactive interface are moved to the virtual progress indicator, the connected at least two target virtual elements are eliminated.
如图2a和图2b所示,图2a示出了本申请具体实施例所提供的虚拟元素移动至虚拟进度标识之前的互动界面示意图,图2b示出了本申请具体实施例所提供的虚拟元素移动至虚拟进度标识之后的互动界面示意图。图2a和图2b中互动界面上展示有多个不同类型的多个虚拟元素和虚拟进度标识,其中,不同类型的虚拟元素的图案和形状不同。As shown in Fig. 2a and Fig. 2b, Fig. 2a shows a schematic diagram of the interactive interface before the virtual element provided by the specific embodiment of the present application is moved to the virtual progress indicator, and Fig. 2b shows the virtual element provided by the specific embodiment of the present application. Schematic diagram of the interactive interface after moving to the virtual progress indicator. Multiple virtual elements of different types and virtual progress indicators are displayed on the interactive interface in FIG. 2a and FIG. 2b, wherein the patterns and shapes of different types of virtual elements are different.
图2a中的虚线区域内的虚拟元素为同类型的元素,且三个同种类型的虚拟元素相连,即,这三个虚拟元素之间的位置关系符合预设条件,这里,将虚线区域内的虚拟元素叫做目标虚拟元素,进而,控制每个目标虚拟元素按照对应的曲线移动路线移动至虚拟进度标识所在的位置。图2b示出了本申请具体实施例所提供的虚拟元素移动至虚拟进度标识之后的互动界面示意图,图2b中虚线区域内的虚拟元素为图2a中原来位于目标虚拟元素上一行的虚拟元素,目标虚拟元素被消除,此时,虚拟进度标识沿着预设路径前进预设距离。The virtual elements in the dashed area in Fig. 2a are elements of the same type, and three virtual elements of the same type are connected, that is, the positional relationship between the three virtual elements conforms to the preset condition. The virtual element is called the target virtual element, and further, each target virtual element is controlled to move to the position where the virtual progress mark is located according to the corresponding curve movement route. Fig. 2b shows a schematic diagram of the interactive interface after the virtual element provided by the specific embodiment of the present application is moved to the virtual progress indicator. The virtual element in the dashed area in Fig. 2b is the virtual element originally located on the line above the target virtual element in Fig. 2a, The target virtual element is eliminated, and at this time, the virtual progress marker advances a preset distance along a preset path.
这里,互动界面以游戏界面为例对图2a和图2b进行具体阐述,在检测到屏幕中任意三个虚拟元素(比如珠子)连接在一起后,则三个虚拟元素“拼车”成功,三个虚拟元素会沿着一条曲线飞入到屏幕上部的虚拟进度标识(小车)中;每拼成一组,累计拼成的数据便会增加。而虚拟进度标识的位置是拼成数进度条的当前位置,随着用户不断的拼成,用户所得分数便会不断累加,进度条便会增加,虚拟进度标识便会不断向着预设位置靠近。这里,图2a中的目标虚拟元素为起点,虚拟进度标识为终点。Here, the interactive interface takes the game interface as an example to describe Fig. 2a and Fig. 2b in detail. After detecting that any three virtual elements (such as beads) on the screen are connected together, the three virtual elements "carpool" successfully, and the three The virtual elements will fly along a curve into the virtual progress indicator (car) on the upper part of the screen; each time a group is assembled, the accumulated data will increase. The position of the virtual progress mark is the current position of the progress bar. As the user continues to make pieces, the user's scores will continue to accumulate, the progress bar will increase, and the virtual progress mark will continue to approach the preset position. Here, the target virtual element in Fig. 2a is the starting point, and the virtual progress is marked as the ending point.
在本申请实施例中,通过响应订单界面中互动图标的触发操作,进入互动界面,响应针对互动界面中任一虚拟元素的滑动操作,控制该虚拟元素调整位置,响应至少两个目标虚拟元素之间的位置关系符合预设条件,以相同的曲线计算方式分别计算每个目标虚拟元素向虚拟进度标识移动的曲线移动路线,并控制每个目标虚拟元素沿着对应的曲线移动路线移动,以及调整虚拟进度标识的位置。基于上述方式,通过订单界面进入互动界面,可以增加用户与服务平台之间的互动,提升服务平台的资源利用率,另外,虚拟元素沿着曲线移动路线移动,在提升动画效果的同时,可以节约终端设备的计算资源。In the embodiment of the present application, by responding to the trigger operation of the interactive icon in the order interface, enter the interactive interface, respond to the sliding operation of any virtual element in the interactive interface, control the virtual element to adjust the position, and respond to the position of the at least two target virtual elements. The positional relationship between them meets the preset conditions, and the curve movement route of each target virtual element moving to the virtual progress mark is calculated in the same curve calculation method, and each target virtual element is controlled to move along the corresponding curve movement route, and adjust The location of the virtual progress id. Based on the above method, entering the interactive interface through the order interface can increase the interaction between the user and the service platform, and improve the resource utilization rate of the service platform. In addition, the virtual elements move along the curve movement route, which can improve the animation effect and save energy. The computing resources of the terminal device.
基于同一申请构思,本申请实施例中还提供了与上述实施例提供的虚拟元素的控制方法对应的虚拟元素的控制装置,由于本申请实施例中的装置解决问题的原理与本申请上述实施例的虚拟元素的控制方法相似,因此装置的实施可以参见方法的实施,重复之处不再赘述。Based on the same application concept, the embodiment of the present application also provides a virtual element control device corresponding to the virtual element control method provided by the above-mentioned embodiments. The control methods of the virtual elements are similar, so the implementation of the device can refer to the implementation of the method, and the repeated places will not be repeated.
如图3至图5所示,图3示出了本申请实施例所提供的一种虚拟元素的控制装置的功能模块图之一;图4示出了本申请实施例所提供的移动模块的功能模块图;图5示出了本申请实施例所提供的一种虚拟元素的控制装置的功能模块图之二。As shown in FIG. 3 to FIG. 5 , FIG. 3 shows one of the functional module diagrams of a virtual element control device provided by the embodiment of the present application; FIG. 4 shows the mobile module provided by the embodiment of the present application. Functional block diagram; FIG. 5 shows the second functional block diagram of a virtual element control device provided by an embodiment of the present application.
如图3所示,虚拟元素的控制装置300包括:As shown in FIG. 3, the
展示模块310,用于响应在服务订单的订单界面中所展示的互动图标的触发操作,进入互动界面;所述互动界面中展示有虚拟进度标识和多个虚拟元素;The
控制模块320,用于响应针对任一所述虚拟元素的滑动操作,控制所述虚拟元素调整位置;a
移动模块330,用于响应所述多个虚拟元素中的至少两个目标虚拟元素之间的位置关系符合预设条件,以相同的曲线计算方式分别计算每个所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线;The moving
调整模块340,用于控制每个所述目标虚拟元素沿着对应的曲线移动路线移动,并调整所述虚拟进度标识的位置。The
在一种可能的实施方式中,所述预设条件包括:In a possible implementation, the preset conditions include:
所述多个虚拟元素中存在同种类型的至少两个目标虚拟元素相连。At least two target virtual elements of the same type are connected to each other in the plurality of virtual elements.
在一种可能的实施方式中,如图4所示,所述移动模块330包括:In a possible implementation manner, as shown in FIG. 4 , the moving
确定单元331,用于基于每个所述目标虚拟元素的第一坐标和所述虚拟进度标识的第二坐标,确定在所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的途经点的第三坐标;A
计算单元332,用于基于所述目标虚拟元素的第一坐标、所述目标虚拟元素对应的途经点的第三坐标,以及所述虚拟进度标识的第二坐标,计算所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线。The
在一种可能的实施方式中,如图4所示,所述确定单元331,具体用于根据以下步骤确定途经点的第三坐标:In a possible implementation manner, as shown in FIG. 4 , the determining
根据所述目标虚拟元素与所述虚拟进度标识之间的位置关系,确定所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线的曲线系数;According to the positional relationship between the target virtual element and the virtual progress marker, determine the curve coefficient of the curve movement route of the target virtual element moving to the virtual progress marker;
基于所述目标虚拟元素的第一坐标、所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的曲线系数,以及所述虚拟进度标识的第二坐标,确定在所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的途经点的第三坐标。Based on the first coordinate of the target virtual element, the curve coefficient of the curved movement route between the target virtual element and the virtual progress marker, and the second coordinate of the virtual progress marker, determine the position at the target virtual element The third coordinate of the waypoint of the curvilinear movement route between the virtual progress marker.
在一种可能的实施方式中,如图4所示,所述计算单元332,用于根据以下步骤计算所述曲线移动路线:In a possible implementation manner, as shown in FIG. 4 , the
根据所述目标虚拟元素的第一坐标、所述目标虚拟元素对应的途经点的第三坐标、所述虚拟进度标识的第二坐标,以及预设曲线公式,计算出所述目标虚拟元素与所述虚拟进度标识之间的曲线移动路线的曲线参数;According to the first coordinate of the target virtual element, the third coordinate of the waypoint corresponding to the target virtual element, the second coordinate of the virtual progress marker, and the preset curve formula, the relationship between the target virtual element and the target virtual element is calculated. Describe the curve parameters of the curve movement route between the virtual progress marks;
根据计算出的所述目标虚拟元素对应的曲线移动路线的曲线参数,以及所述预设曲线公式,计算所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线。According to the calculated curve parameters of the curve movement route corresponding to the target virtual element and the preset curve formula, the curve movement route of the target virtual element moving toward the virtual progress marker is calculated.
在一种可能的实施方式中,如图3所示,所述调整模块340,用于根据以下步骤调整所述虚拟进度标识的位置:In a possible implementation manner, as shown in FIG. 3 , the
控制相连的至少两个目标虚拟元素中各个所述目标虚拟元素,以预设速度同时沿着各自对应的曲线移动路线进行移动。Each of the at least two connected target virtual elements is controlled to move along the respective corresponding curved moving routes simultaneously at a preset speed.
在一种可能的实施方式中,如图3所示,所述调整模块340用于:In a possible implementation manner, as shown in FIG. 3 , the
控制所述虚拟进度标识沿着预设路径前进预设距离。The virtual progress marker is controlled to advance a preset distance along a preset path.
在一种可能的实施方式中,如图5所示,所述虚拟元素的控制装置300还包括:In a possible implementation manner, as shown in FIG. 5 , the
确定模块350,用于确定所述虚拟进度标识所在位置是否为预设位置;A
发送模块360,用于若是,向所述服务订单对应的账户发送虚拟资源。The sending
在一种可能的实施方式中,所述虚拟资源包括以下资源中的至少一种:In a possible implementation, the virtual resource includes at least one of the following resources:
打折券;代金券;出行券。Discount coupons; vouchers; travel vouchers.
在本申请实施例中,通过响应订单界面中互动图标的触发操作,进入互动界面,响应针对互动界面中任一虚拟元素的滑动操作,控制该虚拟元素调整位置,响应至少两个目标虚拟元素之间的位置关系符合预设条件,以相同的曲线计算方式分别计算每个目标虚拟元素向虚拟进度标识移动的曲线移动路线,并控制每个目标虚拟元素沿着对应的曲线移动路线移动,以及调整虚拟进度标识的位置。基于上述方式,通过订单界面进入互动界面,可以增加用户与服务平台之间的互动,提升服务平台的资源利用率,另外,虚拟元素沿着曲线移动路线移动,在提升动画效果的同时,可以节约终端设备的计算资源。In the embodiment of the present application, by responding to the trigger operation of the interactive icon in the order interface, enter the interactive interface, respond to the sliding operation of any virtual element in the interactive interface, control the virtual element to adjust the position, and respond to the position of the at least two target virtual elements. The positional relationship between them meets the preset conditions, and the curve movement route of each target virtual element moving to the virtual progress mark is calculated in the same curve calculation method, and each target virtual element is controlled to move along the corresponding curve movement route, and adjust The location of the virtual progress id. Based on the above method, entering the interactive interface through the order interface can increase the interaction between the user and the service platform, and improve the resource utilization rate of the service platform. In addition, the virtual elements move along the curve movement route, which can improve the animation effect and save energy. The computing resources of the terminal device.
基于同一申请构思,参见图6所示,为本申请实施例提供的一种电子设备600的结构示意图,包括:处理器610、存储器620和总线630,所述存储器620存储有所述处理器610可执行的机器可读指令,当电子设备600运行时,所述处理器610与所述存储器620之间通过所述总线630进行通信,所述机器可读指令被所述处理器610运行时执行如上述实施例中任一所述的虚拟元素的控制方法的步骤。Based on the concept of the same application, see FIG. 6 , which is a schematic structural diagram of an electronic device 600 provided in an embodiment of the application, including: a
具体地,所述机器可读指令被所述处理器610执行时可以执行如下处理:Specifically, when the machine-readable instructions are executed by the
响应在服务订单的订单界面中所展示的互动图标的触发操作,进入互动界面;所述互动界面中展示有虚拟进度标识和多个虚拟元素;In response to the trigger operation of the interactive icon displayed in the order interface of the service order, enter the interactive interface; the interactive interface displays a virtual progress mark and a plurality of virtual elements;
响应针对任一所述虚拟元素的滑动操作,控制所述虚拟元素调整位置;In response to a sliding operation for any of the virtual elements, controlling the virtual element to adjust the position;
响应所述多个虚拟元素中的至少两个目标虚拟元素之间的位置关系符合预设条件,以相同的曲线计算方式分别计算每个所述目标虚拟元素向所述虚拟进度标识移动的曲线移动路线;In response to the positional relationship between at least two target virtual elements in the plurality of virtual elements conforming to the preset condition, the curve movement of each target virtual element moving toward the virtual progress mark is calculated separately in the same curve calculation manner route;
控制每个所述目标虚拟元素沿着对应的曲线移动路线移动,并调整所述虚拟进度标识的位置。Each of the target virtual elements is controlled to move along the corresponding curve movement route, and the position of the virtual progress marker is adjusted.
本申请实施例中,通过响应订单界面中互动图标的触发操作,进入互动界面,响应针对互动界面中任一虚拟元素的滑动操作,控制该虚拟元素调整位置,响应至少两个目标虚拟元素之间的位置关系符合预设条件,以相同的曲线计算方式分别计算每个目标虚拟元素向虚拟进度标识移动的曲线移动路线,并控制每个目标虚拟元素沿着对应的曲线移动路线移动,以及调整虚拟进度标识的位置。基于上述方式,通过订单界面进入互动界面,可以增加用户与服务平台之间的互动,提升服务平台的资源利用率,另外,虚拟元素沿着曲线移动路线移动,在提升动画效果的同时,可以节约终端设备的计算资源。In the embodiment of the present application, by responding to the trigger operation of the interactive icon in the order interface, the interactive interface is entered, and in response to the sliding operation on any virtual element in the interactive interface, the virtual element is controlled to adjust the position, and the position between the at least two target virtual elements is controlled. The positional relationship of the target virtual element conforms to the preset conditions, and the curve movement route of each target virtual element moving to the virtual progress mark is calculated in the same curve calculation method, and each target virtual element is controlled to move along the corresponding curve movement route, and adjust the virtual The location of the progress id. Based on the above method, entering the interactive interface through the order interface can increase the interaction between the user and the service platform, and improve the resource utilization rate of the service platform. In addition, the virtual elements move along the curve movement route, which can improve the animation effect and save energy. The computing resources of the terminal device.
基于同一申请构思,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器运行时执行上述实施例提供的虚拟元素的控制方法的步骤。Based on the same application concept, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program executes the virtual elements provided by the foregoing embodiments when the computer program is run by a processor steps of the control method.
具体地,所述存储介质能够为通用的存储介质,如移动磁盘、硬盘等,所述存储介质上的计算机程序被运行时,能够执行上述虚拟元素的控制方法,通过订单界面进入互动界面,可以增加用户与服务平台之间的互动,提升服务平台的资源利用率,另外,虚拟元素沿着曲线移动路线移动,在提升动画效果的同时,可以节约终端设备的计算资源。Specifically, the storage medium can be a general storage medium, such as a removable disk, a hard disk, etc. When the computer program on the storage medium is run, it can execute the above-mentioned control method of the virtual element, enter the interactive interface through the order interface, and can Increase the interaction between the user and the service platform, and improve the resource utilization of the service platform. In addition, the virtual elements move along the curve movement route, which can save the computing resources of the terminal device while improving the animation effect.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本申请所提供的几个实施例中,应所述理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the system and device described above, reference may be made to the corresponding process in the foregoing method embodiments, which will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. The apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces, indirect coupling or communication connection of devices or units, which may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者所述技术方案的部分可以以软件产品的形式体现出来,所述计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a processor-executable non-volatile computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that make contributions to the prior art or the parts of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
以上仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only the specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the technical scope disclosed in the present application can easily think of changes or replacements, which should be covered within the scope of the present application. within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010694264.7A CN111857922B (en) | 2020-07-17 | 2020-07-17 | Virtual element control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010694264.7A CN111857922B (en) | 2020-07-17 | 2020-07-17 | Virtual element control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111857922A true CN111857922A (en) | 2020-10-30 |
CN111857922B CN111857922B (en) | 2024-10-18 |
Family
ID=73000592
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010694264.7A Active CN111857922B (en) | 2020-07-17 | 2020-07-17 | Virtual element control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111857922B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113448579A (en) * | 2021-07-08 | 2021-09-28 | 京东科技控股股份有限公司 | Method and device for realizing edge movement effect in visual interface |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017185459A1 (en) * | 2016-04-29 | 2017-11-02 | 宇龙计算机通信科技(深圳)有限公司 | Method and apparatus for moving icons |
US20180001189A1 (en) * | 2015-06-16 | 2018-01-04 | Tencent Technology (Shenzhen) Company Limited | Method for locking target in game scenario and terminal |
CN110548286A (en) * | 2019-09-29 | 2019-12-10 | 网易(杭州)网络有限公司 | Method and device for locking virtual object in game and electronic equipment |
US20190381403A1 (en) * | 2017-09-21 | 2019-12-19 | Tencent Technology (Shenzhen) Company Limited | Target positioning method and apparatus in virtual interactive scene |
CN110599263A (en) * | 2019-09-26 | 2019-12-20 | 腾讯科技(深圳)有限公司 | User interaction data processing method and device, storage medium and computer equipment |
CN111275797A (en) * | 2020-02-26 | 2020-06-12 | 腾讯科技(深圳)有限公司 | Animation display method, device, equipment and storage medium |
CN111324253A (en) * | 2020-02-12 | 2020-06-23 | 腾讯科技(深圳)有限公司 | Virtual article interaction method and device, computer equipment and storage medium |
-
2020
- 2020-07-17 CN CN202010694264.7A patent/CN111857922B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180001189A1 (en) * | 2015-06-16 | 2018-01-04 | Tencent Technology (Shenzhen) Company Limited | Method for locking target in game scenario and terminal |
WO2017185459A1 (en) * | 2016-04-29 | 2017-11-02 | 宇龙计算机通信科技(深圳)有限公司 | Method and apparatus for moving icons |
US20190381403A1 (en) * | 2017-09-21 | 2019-12-19 | Tencent Technology (Shenzhen) Company Limited | Target positioning method and apparatus in virtual interactive scene |
CN110599263A (en) * | 2019-09-26 | 2019-12-20 | 腾讯科技(深圳)有限公司 | User interaction data processing method and device, storage medium and computer equipment |
CN110548286A (en) * | 2019-09-29 | 2019-12-10 | 网易(杭州)网络有限公司 | Method and device for locking virtual object in game and electronic equipment |
CN111324253A (en) * | 2020-02-12 | 2020-06-23 | 腾讯科技(深圳)有限公司 | Virtual article interaction method and device, computer equipment and storage medium |
CN111275797A (en) * | 2020-02-26 | 2020-06-12 | 腾讯科技(深圳)有限公司 | Animation display method, device, equipment and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113448579A (en) * | 2021-07-08 | 2021-09-28 | 京东科技控股股份有限公司 | Method and device for realizing edge movement effect in visual interface |
CN113448579B (en) * | 2021-07-08 | 2024-04-09 | 京东科技控股股份有限公司 | Method and device for realizing side dynamic effect in visual interface |
Also Published As
Publication number | Publication date |
---|---|
CN111857922B (en) | 2024-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20240062610A1 (en) | Graphical user interface for a gaming system | |
CN104076986B (en) | A kind of method of toch control for multiple point touching terminal and equipment | |
KR101418221B1 (en) | Non-transitory information processing device-readable storage medium, and information processing device | |
JP6114460B1 (en) | GAME SYSTEM, GAME PROCESSING METHOD, GAME PROGRAM, AND GAME DEVICE | |
US20180161674A1 (en) | Terminal device | |
US10528247B2 (en) | Operation system having touch operation enabling use of large screen area, operation control method, and operation control program | |
JP6450350B2 (en) | GAME CONTROL METHOD, GAME CONTROL DEVICE, AND ITS RECORDING MEDIUM | |
EP2447820A2 (en) | Display device, display method, display program, and computer readable medium | |
JP5395977B1 (en) | Game providing system, game providing program, and game providing method | |
CN110665228A (en) | Method and device for controlling role cards in game | |
KR20130015922A (en) | Method and apparatus for input password in using game | |
CN110339556A (en) | Display control method and device in a kind of game | |
CN112957729A (en) | Shooting aiming method, device, equipment and storage medium in game | |
CN111857922A (en) | A virtual element control method and device | |
CN110287442A (en) | A kind of determination method, apparatus, electronic equipment and the storage medium of influence power ranking | |
CN109529341A (en) | A kind of paths planning method, device and computer readable storage medium | |
US20230219001A1 (en) | Terminal apparatus, control method, and control program | |
CN112973124A (en) | Method, device and equipment for processing virtual article in game and storage medium | |
KR20240145962A (en) | Method for providing information and electronic apparatus for performing the same | |
CN112180841B (en) | Man-machine interaction method, device, equipment and storage medium | |
EP3312790A1 (en) | Display control device and method | |
CN110652724A (en) | Display control method and device in game | |
CN112263833A (en) | Game control method and device | |
CN109785442B (en) | Image rotation control method and device, and image rotation display method and system | |
CN113680067A (en) | Method, device, equipment and storage medium for controlling virtual props in game |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TG01 | Patent term adjustment | ||
TG01 | Patent term adjustment |