Virtual prop placement control method and device, and electronic device
By utilizing a graphical user interface and touch controls in sandbox building games, the placement and orientation of virtual props are automatically adjusted to align with a reference prop, solving the problem of virtual props not being placed correctly and improving the gaming experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2026-03-20
AI Technical Summary
In sandbox building games, virtual items often fail to align when placed quickly, requiring players to perform tedious operations such as demolition and reconstruction or manual adjustments, which negatively impacts the gaming experience.
The terminal device provides a graphical user interface that responds to the player's touch operation, identifies the target item and the reference item, and updates the placement of the item to be moved using the placement of the reference item to align it with the reference item, thus simplifying the operation process.
The process of aligning virtual items has been simplified, improving the player's gaming experience and reducing operational costs and resource waste.
Smart Images

Figure CN116474370B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of game interaction, in particular to a virtual prop placement control method and device and electronic equipment. BACKGROUND
[0002] In a sandbox building game, in order to obtain higher freedom, the automatic adsorption alignment strength in the game scene for placing furniture or building materials is often reduced, so that the building modules or furniture often fail to align in the process of rapid placement. In the related art, based on the setting of the placement logic of the game, the player needs to recycle the modules that fail to align and then place them again, or needs to drag the modules that fail to align to adjust their positions so that the multiple modules that need to be aligned are aligned. The operation process of the above two ways is relatively cumbersome, which makes the game experience of the player poor. SUMMARY
[0003] Therefore, the purpose of the present application is to provide a virtual prop placement control method and device and electronic equipment to simplify the operation of aligning virtual props in the game and improve the game experience of the player.
[0004] In a first aspect, an embodiment of the present application provides a virtual prop placement control method. A graphical user interface is provided by a terminal device. The graphical user interface displays a game scene including multiple virtual props. The method comprises: determining multiple target props from the multiple virtual props based on an operation touch point of a first touch operation in response to the first touch operation; determining a reference prop and a to-be-moved prop in the target props according to the first touch operation or a second touch operation acting on at least part of the target props in response to the second touch operation; and updating a placement pose of the to-be-moved prop in the target props according to a placement pose of the reference prop in the target props, so that the to-be-moved prop after the placement pose is updated is aligned with the reference prop according to a preset rule.
[0005] In a second aspect, an embodiment of the present application provides a virtual prop placement control device. A graphical user interface is provided by a terminal device. The graphical user interface displays a game scene including multiple virtual props. The device comprises: a target prop determination module configured to determine multiple target props from the multiple virtual props based on an operation touch point of a first touch operation in response to the first touch operation; a reference prop determination module configured to determine a reference prop and a to-be-moved prop in the target props according to the first touch operation or a second touch operation acting on at least part of the target props in response to the second touch operation; and a placement pose updating module configured to update a placement pose of the to-be-moved prop in the target props according to a placement pose of the reference prop in the target props, so that the to-be-moved prop after the placement pose is updated is aligned with the reference prop according to a preset rule.
[0006] In a third aspect, an electronic device is provided, which includes a processor and a memory. The memory stores machine executable instructions capable of being executed by the processor. The processor executes the machine executable instructions to implement the virtual prop placement control method described above.
[0007] In a fourth aspect, a machine readable storage medium is provided, which stores machine executable instructions. When the machine executable instructions are invoked and executed by a processor, the machine executable instructions cause the processor to implement the virtual prop placement control method described above.
[0008] The embodiments of the present application have the following beneficial effects:
[0009] The virtual prop placement control method, device and electronic device described above, in response to the first touch operation, determine a plurality of target props from the plurality of virtual props based on the operation touch point of the first touch operation; in response to a second touch operation acting on at least part of the target props, determine a reference prop and a prop to be moved in the target props according to the first touch operation or the second touch operation; and update the placement pose of the prop to be moved in the target props according to the placement pose of the reference prop in the target props, so that the prop to be moved after the placement pose is updated is aligned with the reference prop according to a preset rule. This way simplifies the operation of aligning virtual props in the game and improves the game experience of the player.
[0010] Other features and advantages of the present application will be further described in the following description, and in part will become apparent to those skilled in the art from the following description, or will be learned by practice of the present application. The objects and other advantages of the present application will be realized and achieved by the structure particularly pointed out in the specification, claims and drawings.
[0011] In order to make the above-mentioned objects, features and advantages of the present application more apparent, the following will describe a preferred embodiment, and the accompanying drawings will be described in detail as follows. BRIEF DESCRIPTION OF DRAWINGS
[0012] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings described below are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0013] Figure 1 A flow chart of a virtual prop placement control method provided by the embodiments of the present application is shown in the figure;
[0014] Figure 2 A schematic diagram of a pinch operation provided by the embodiments of the present application is shown in the figure;
[0015] Figure 3 A schematic diagram of a placement surface provided for an embodiment of the present application;
[0016] Figure 4 A schematic diagram of a projection surface provided for an embodiment of the present application;
[0017] Figure 5 A schematic diagram of another projection surface provided for an embodiment of the present application;
[0018] Figure 6 A schematic diagram of the relative position relationship of the bounding boxes of two virtual props provided for an embodiment of the present application;
[0019] Figure 7 A schematic diagram of the landing point of a pinch operation provided for an embodiment of the present application;
[0020] Figure 8 A schematic diagram of the reference prop and the prop to be moved after movement provided for an embodiment of the present application;
[0021] Figure 9 A schematic diagram of the relative position relationship of the reference assembly and the movement assembly provided for an embodiment of the present application;
[0022] Figure 10 A structural schematic diagram of a virtual prop placement control device provided for an embodiment of the present application;
[0023] Figure 11 A structural schematic diagram of an electronic device provided for an embodiment of the present application. DETAILED DESCRIPTION
[0024] To make the objectives, technical solutions and advantages of embodiments of the present application clearer, the technical solutions of the present application will be described below in detail with reference to the accompanying drawings. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0025] In sandbox building games, in order to obtain higher freedom, the threshold of automatic adsorption alignment is often reduced when the player builds or places virtual props, that is, more delicate placement is required to trigger automatic adsorption. If you want to quickly and not delicately, it is not easy to trigger automatic adsorption, resulting in misalignment. Therefore, it often happens that building modules or furniture cannot be aligned in the process of quick placement.
[0026] In the related art, the player usually needs to demolish the virtual props that have been built or placed to rebuild or place them again. Especially when the virtual props are furniture and the furniture has already put the items in it, due to the backpack capacity limit, the player cannot one-click the furniture to put it away, and often needs to manually transfer the items to the backpack or other containers first, and then put the furniture away and place it again. Further, for the mechanism with material loss logic, it will also cause the loss of the player's resources. Whether it is demolition and reconstruction or putting away and placing again, it will often bring the player negative emotions of resource loss or tedious operation.
[0027] Whether it is building or furniture placement, the whole process at least needs the player to pay more, to perform operations such as putting away, taking out or selecting, aligning or moving, placing, and a series of at least three steps of operations, which adds unnecessary tedious operations to the player and the experience is not good.
[0028] Therefore, based on this, the embodiment of the present application provides a virtual prop placement control method, device and electronic equipment, which can be applied to various game scenes that need to place virtual props.
[0029] The virtual prop placement control method in one of the embodiments disclosed in the present application can run on a local terminal device or a server. When the virtual prop placement control method runs on the server, this mode can be realized and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0030] In an optional embodiment, various cloud applications can be run under the cloud interaction system, for example: cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the running mode of cloud games, the running body of the game program and the presentation body of the game picture are separated, and the storage and running of the virtual prop placement control method are completed on the cloud game server. The client device is used for data reception, sending and game picture presentation. For example, the client device can be a display device close to the user side with data transmission function, such as a mobile terminal, a television, a computer, a palm computer, etc.; but the information processing is the cloud game server in the cloud. When playing the game, the player operates the client device to send operation instructions to the cloud game server, the cloud game server runs the game according to the operation instructions, encodes and compresses the game picture data, returns the data to the client device through the network, and finally decodes and outputs the game picture through the client device.
[0031] In an optional embodiment, taking a game as an example, the local terminal device stores a game program and is configured to present a game screen. The local terminal device is configured to interact with a player through a graphical user interface, i.e., a conventional game program is downloaded and installed on an electronic device and then run. The local terminal device can provide the graphical user interface to the player in various ways, for example, the graphical user interface can be rendered on a display screen of the terminal, or provided to the player through holographic projection. For example, the local terminal device can include a display screen configured to present a graphical user interface including a game screen, and a processor configured to run the game, generate the graphical user interface, and control display of the graphical user interface on the display screen.
[0032] In a possible embodiment, the method for placing virtual props provided by the present application includes providing a graphical user interface through a terminal device. The terminal device can be the local terminal device mentioned above or a client device in the cloud interaction system mentioned above. The graphical user interface displays a game scene including a plurality of virtual props. The virtual props can be placed in the game scene by the player through a placing operation, or can be pre-set in the game scene and can be changed in pose by the player through a placing operation. As shown in the figure, the method includes the following steps: Figure 1
[0033] Step S102, in response to a first touch operation, determining a plurality of target props from the plurality of virtual props based on an operation touch point of the first touch operation.
[0034] The first touch operation usually acts on the target props that the player wants to perform the alignment operation. Since alignment usually means that two or more things are in order or in contact, the target props are at least two, and can be three or more.
[0035] The first touch operation can be a click operation on the target props, or a double-click operation, a long press operation, etc. For example, after the player double-clicks one virtual prop and clicks another virtual prop, the two virtual props are taken as target props; or the player long-presses one virtual prop and clicks two virtual props, and the three virtual props are taken as target props. The first touch operation usually needs to use a conventional touch operation as a starting operation to select the target props, and select other target props after the operation. In the above examples, the player's double-click or long-press operation on one virtual prop can be considered as the starting operation to select the target props.
[0036] Step S104, in response to a second touch operation acting on at least part of the target props, determining a reference prop and a to-be-moved prop in the target props according to the first touch operation or the second touch operation.
[0037] After identifying multiple target items, it is necessary to determine the base item and the item to be moved from among them. The second touch operation can be continuous with the first touch operation or discontinuous. For example, after identifying multiple target items and releasing the first touch operation, the second touch operation could be clicking on a target item, which can then be designated as the base item. In practice, to simplify user operation, the second touch operation is usually set to be continuous with the first touch operation; for example, the second touch operation could be a swipe operation starting from the touch point of the first touch operation. The specific method can be set according to requirements and is not limited here.
[0038] Since the purpose of the above method is to align multiple target props, a reference placement pose is usually required during the alignment process so that the multiple target props can be aligned based on the reference placement pose. The reference placement pose can be the placement pose of one of the target props, or it can be a reference placement pose calculated based on the placement poses of multiple target props. For example, when using the average placement pose of selected multiple target props as the reference placement pose, the center position of the placement positions of the multiple target props can be calculated as the reference position, or the average pose of the placement poses of the multiple target props can be calculated as the reference pose, etc.
[0039] When the placement of one target item needs to be used as a reference placement position, that target item can be called the base item. Other target items need to be moved and rotated with reference to the placement position of the base item. The base item and the item to be moved can be determined based on either the first touch operation or the second touch operation, or both. For example, the target item in a certain selection order can be designated as the base item according to the selection order of the first touch operation. Typically, the first or last selected target item can be set as the base item. The target item can also be selected based on the touch order of the second touch operation, using the same method as described above, which will not be elaborated here. Furthermore, when the second touch operation is a swipe operation, the base item can also be determined based on the swipe direction, for example, the target item pointed to by the swipe operation can be designated as the base item.
[0040] Step S106: Based on the placement of the reference item in the target item, update the placement of the item to be moved in the target item so that the item to be moved after the placement is updated is aligned with the reference item according to the preset rules.
[0041] In updating the relative placement poses of the plurality of target props, a reference placement pose is usually referred to. If the reference placement pose is not the placement pose of any of the plurality of target props, the placement pose of each target prop needs to be updated. If the reference placement pose is the placement pose of one of the target props, the placement poses of the other target props relative to the target prop need to be updated.
[0042] In a specific implementation, a preset rule is usually used to determine the reference placement pose and the manner of updating the placement poses of the target props. For example, the preset rule can be that the average placement pose of the selected plurality of target props is taken as the reference placement pose, and the plurality of target props after alignment are updated to the placement poses in the average placement pose; the preset rule can also be that the first selected target prop is taken as a reference prop, and the other target props after alignment are updated to the placement pose of the reference prop, and the other target props after alignment are as close as possible to the placement position of the reference prop, and the like. The preset rule can be set according to specific needs, which is not limited herein.
[0043] The above-mentioned virtual prop placement control method determines a plurality of target props from a plurality of virtual props based on an operation touch point of a first touch operation in response to the first touch operation; determines a reference prop and a target prop to be moved in the target props according to the first touch operation or a second touch operation acting on at least part of the target props in response to the second touch operation; and updates the placement pose of the target prop to be moved in the target props according to the placement pose of the reference prop in the target props, so that the target prop to be moved after the placement pose is updated is aligned with the reference prop according to a preset rule. This way simplifies the operation of aligning virtual props in the game and improves the game experience of the player.
[0044] The following embodiments provide a specific way of determining a plurality of target props based on an operation touch point of a first touch operation.
[0045] In a specific implementation, the target prop can be two, and correspondingly, the above-mentioned first touch operation includes a first sub-operation and a second sub-operation; the two sub-operations can act on the two virtual props respectively, so as to determine the two virtual props as target virtual props. The first sub-operation and the second sub-operation can be the same type of touch operation, or can be different types of touch operation. For example, the first sub-operation can be a click operation, and the second sub-operation can be a long press operation, or vice versa; or the first sub-operation and the second sub-operation are both click operations, and the like. The specific way can be set according to the needs, which is not limited herein.
[0046] Users typically use two fingers to touch two virtual items. The touching process usually has a sequence; touching a virtual item first can be considered the first sub-operation, and touching it later can be considered the second sub-operation. In this case, in response to the first sub-operation on the first item among multiple virtual items, the touch position of the first sub-operation can be monitored; in response to the touch position of the first sub-operation remaining on the first item, and in response to the second sub-operation on the second item among multiple virtual items, both the first and second items can be identified as target items. That is, if the user presses the first item and then presses the second item, both the first and second items will be identified as target items.
[0047] The following embodiments provide a method for determining a reference prop and a prop to be moved in the target prop based on a second touch operation applied to at least a portion of the target prop, according to either the first touch operation or the second touch operation.
[0048] In practical implementation, the first touch operation may include a first sub-operation applied to the first prop and, when applied to the second prop, a second touch operation is generated. In response to the second touch operation applied to the first and / or second prop, the reference prop and the prop to be moved in the first and second props can be determined according to the order in which the first and second sub-operations are generated. The aforementioned second touch operation can be a sliding operation on the first prop, a sliding operation on the second prop, or a sliding operation on both the first and second props simultaneously. Since the first and second sub-operations usually have a sequential generation order, the prop affected by the first sub-operation can be pre-set as the reference prop, and the other as the prop to be moved; or the reverse setting can also be used.
[0049] Specifically, the aforementioned second touch operation can be a first sliding operation consecutive to the first sub-operation, and a second sliding operation consecutive to the second sub-operation. In response to the first sliding operation acting on the first prop and the second sliding operation acting on the second prop satisfying a first condition, the reference prop and the prop to be moved in the first and second props are determined according to the generation order of the first and second sub-operations. The first condition includes at least: the sliding direction of the first sliding operation points to the second prop, and / or the sliding direction of the second sliding operation points to the first prop. When the first condition is that the first sliding operation points to the second prop and the second sliding operation points to the first prop, the two operations can be considered as a "pinch operation," such as... Figure 2 As shown. Figure 2 The arrow in the text indicates the direction of the sliding operation. Additionally, the first condition can also include restrictions on the length of the sliding trajectory or the sliding time; these can be set according to requirements and are not specified here.
[0050] In the case that the second touch operation is determined to include a third sliding operation continuous with the first sub-operation, the first prop is determined as the reference prop and the second prop is determined as the prop to be moved, in response to the third sliding operation acting on the first prop satisfying a preset second condition; or the first prop is determined as the prop to be moved and the second prop is determined as the reference prop, in response to the third sliding operation acting on the first prop satisfying the second condition. The preset first condition includes at least that the sliding direction of the third sliding operation points to the second prop, i.e., the sliding operation points from the first prop to the second prop. At this time, the second sub-operation can have been released.
[0051] Further, the touch position of the second sub-operation can be required to stay on the second prop to trigger the determination of the reference prop and the prop to be moved. Specifically, the first prop is determined as the reference prop and the second prop is determined as the prop to be moved, in response to the third sliding operation acting on the first prop satisfying the second condition and the touch position of the second sub-operation staying on the second prop.
[0052] The following embodiments provide a specific way of updating the placement pose of the prop to be moved in the target props according to the placement pose of the reference prop in the target props, so that the prop to be moved after the update of the placement pose is aligned with the reference prop according to a preset rule.
[0053] The Chinese interpretation of "alignment" is: make two or more things fit or touch each other in order. Usually, it refers to arranging two or more machine parts, especially parts that should be parallel or in line, to the correct position or direction.
[0054] In actual production and life, people can use different reference objects to define the "alignment state" they need. In this method, "alignment" can be defined by the following rules:
[0055] (1) The placement pose of the prop to be moved after the update is parallel to the placement surface of the reference prop, and the projection of the geometric center of the prop to be moved after the update on the placement surface is aligned with the projection of the geometric center of the reference prop on the placement surface.
[0056] (2) The placement pose of the prop to be moved after the update is parallel to the placement surface of the reference prop, and the first plane of the prop to be moved after the update is coincident with the second plane of the reference prop.
[0057] In both of the above rules, additional restrictions can be added, such as placing the updated moveable item and the reference item on the same placement plane. Furthermore, restrictions can include bounding box collisions between the updated moveable item and the reference item, or minimum distances between the updated moveable item and the reference item being less than a preset distance. These can be set according to requirements and are not specified here.
[0058] Generally speaking, when aligning two target items, the current position of the base item is used as the reference position. The current position of the item to be moved can be updated directly based on the current position of the base item and the current position of the item to be moved.
[0059] The aforementioned current placement posture can include the placement posture and the current placement position. When updating the current placement posture of the item to be moved, it is first necessary to determine the target rotation parameters of the item to be moved based on the placement posture of the reference item and the placement posture of the item to be moved, and control the item to be moved to rotate according to the target rotation parameters to rotate to the updated placement posture. Then, based on the current placement position of the reference item and the current placement position of the rotated item to be moved, the target movement parameters of the item to be moved are determined, and the item to be moved is controlled to move according to the target movement parameters to move to the updated current placement position.
[0060] The placement posture of the virtual props can be represented by the planar posture parameters and normal posture parameters of the placement surface. The placement surface can be the surface of the virtual prop that contacts the game scene. For example... Figure 3 As shown, placement surface a is the placement surface of the reference prop, and placement surface b is the placement surface of the prop to be moved. Corresponding to the planar attitude parameters and normal attitude parameters, the target rotation parameters include planar rotation parameters and normal rotation parameters.
[0061] When the preset rules include that the placement surface of the prop to be moved is parallel to the placement surface of the reference prop, the planar rotation parameters of the prop to be moved are calculated based on the planar attitude parameters of the reference prop's placement surface and the planar attitude parameters of the prop to be moved's placement surface; for example... Figure 3 The arrows indicate the direction of rotation of the item to be moved, and the central angle corresponding to the arrow indicates the rotation angle of the item to be moved. Then, the item to be moved is controlled to rotate according to the planar rotation parameters so that the placement surface of the item to be moved is parallel to the placement surface of the reference item.
[0062] Generally, the base prop and the prop to be moved each have their corresponding bounding boxes, which are invisible. A bounding box, also called a "collision box," is a slightly larger but simpler geometric object used to approximate a complex geometric object (i.e., the virtual prop mentioned above). Therefore, the base prop is located in the first bounding box; the prop to be moved is located in the second bounding box. When the preset rule also includes that a specified edge of the projection surface of the prop to be moved is parallel to a specified edge of the projection surface of the base prop, it is also necessary to determine the normal rotation parameters of the prop to be moved. Specifically, it is necessary to obtain the first projection surface of the first bounding box of the base prop on the current placement surface of the base prop, and the second projection surface of the second bounding box of the prop to be moved on the current placement surface of the prop to be moved after rotation; then, based on the first and second projection surfaces, the normal rotation parameters of the prop to be moved are determined; the prop to be moved is controlled to rotate according to the normal rotation parameters so that a specified edge of the second projection surface of the prop to be moved is parallel to a specified edge of the first projection surface of the base prop. The normal rotation parameter can be considered as the parameter by which the object to be moved rotates around the normal axis that passes through its geometric center.
[0063] When determining the normal rotation parameters based on the first projection plane and the second projection plane, it is first necessary to determine the specified edge of the second projection plane and the specified edge of the first projection plane based on the positional relationship between the second projection plane and the first projection plane; then, based on the specified edge of the second projection plane and the specified edge of the first projection plane, the normal rotation parameters of the prop to be moved are calculated.
[0064] The following details the method for determining specified edges of the second and first projection planes based on their positional relationship when the first projection plane is a first polygon and the second projection plane is a second polygon. For example... Figure 4 As shown, the right side represents the first polygon corresponding to the base prop, and the left side represents the second polygon corresponding to the prop to be moved; both are squares. Obtain the centroid of the first polygon and the centroid of the second polygon; obtain the line connecting the centroid of the second polygon and the centroid of the first polygon, as shown... Figure 4 As shown in L; then, the first edge of the second polygon that intersects with the connecting line is determined as the designated edge of the second projection plane, as shown in... Figure 4 As shown in Figure A; the second side of the first polygon that intersects with the connecting line is defined as the designated side of the first projection plane, as follows. Figure 4 As shown in B.
[0065] If the line passes through the vertices of the first polygon and / or the second polygon, such as Figure 5 As shown, line L passes through the vertex of the prop to be moved. A specified edge is randomly selected from the two edges adjacent to the vertex, representing the first polygon and / or the second polygon. Figure 5 As shown in Figures A and B.
[0066] When the first projection plane is a circle and the second projection plane is a third polygon, the geometric center of the circle and the geometric center of the third polygon are also needed to be obtained; then the line connecting the geometric center of the circle and the geometric center of the third polygon is obtained; and the intersection point of the circle and the line is determined as the specified point of the first projection plane; and the edge of the third polygon intersecting with the line is determined as the specified edge of the second projection plane. Similar to the above case, if the line passes through a vertex of the third polygon, a certain edge adjacent to the vertex can be randomly selected as the specified edge.
[0067] In the above case, the to-be-moved prop needs to be rotated to a posture in which the specified edge thereof is parallel to the tangent line of the circle. Therefore, when determining the normal rotation parameter of the to-be-moved prop, the tangent line corresponding to the specified point of the circle is determined based on the specified point of the circle; and then the normal rotation parameter of the to-be-moved prop is calculated based on the tangent line and the specified edge of the second projection plane. The normal rotation parameter can make the specified edge of the to-be-moved prop after rotation parallel to the tangent line.
[0068] When the preset rule further includes that the placement plane of the to-be-moved prop and the placement plane of the reference prop are in the same horizontal plane, the distance between the plane corresponding to the placement plane of the to-be-moved prop after rotation and the plane corresponding to the placement plane of the reference prop is calculated after the placement plane of the to-be-moved prop is made parallel to the placement plane of the reference prop, and the calculation result is determined as the normal movement parameter of the to-be-moved prop; wherein the normal movement parameter includes a movement direction and a movement distance; and then the to-be-moved prop is controlled to move according to the normal movement parameter.
[0069] If the preset rule further requires that the to-be-moved prop is in surface contact with the reference prop, the plane movement parameter of the to-be-moved prop can be determined based on the line connecting the geometric center of the first projection plane of the placement plane of the to-be-moved prop after movement and the geometric center of the second projection plane of the placement plane of the reference prop, and the movement parameter also includes a movement direction and a movement distance; and then the to-be-moved prop is controlled to move according to the plane movement parameter until the to-be-moved prop is in surface contact with the reference prop.
[0070] The preset rule can further require that the geometric center of the to-be-moved prop is aligned with the projection of the geometric center of the reference prop on the placement plane on the basis of requiring that the to-be-moved prop is in surface contact with the reference prop. At this time, the relative position parameter between the midpoint of the specified edge of the to-be-moved prop after movement and the midpoint of the specified edge of the reference prop can be calculated, and the to-be-moved prop is controlled to move according to the plane movement parameter until the to-be-moved prop is in surface contact with the reference prop.
[0071] After the object to be moved is moved, the midpoint of the designated edge of the second projection surface of the object to be moved coincides with the end point of the designated edge of the first projection surface of the reference object. In some cases, if the shapes of the object to be moved and / or the reference object are irregular, the object to be moved and the reference object may not yet be in contact when the two midpoints coincide, such as... Figure 6 As shown. Therefore, after moving: it is necessary to determine whether the second bounding box of the object to be moved touches the first bounding box of the reference object; if not, control the object to be moved to move in the direction indicated by the planar movement parameters until the second bounding box of the object to be moved touches the first bounding box of the reference object.
[0072] This invention also provides another method for controlling the placement of virtual props. This method... Figure 1 This method is implemented based on the method shown. By adding a two-finger pinch interaction gesture and through a series of calculations and logical judgments, it achieves the alignment of two virtual props, such as furniture or building modules, thus reducing the player's operational burden.
[0073] This method requires recognizing the player's pinching motion on the screen, identifying the target object touched by the two fingers, determining the order of their contact, and extracting the collision information features. Then, the orientation of the two objects is corrected to the same horizontal plane, and their projected shapes on the horizontal plane are taken. Based on logical calculations and judgments, one of the objects is moved until it aligns with the other object.
[0074] The aforementioned target items can be furniture commonly found in survival games, or items with placement characteristics such as foundations and building components used in the construction process.
[0075] During the two-finger pinching process described above, the touch points of the two fingers on the screen will be sequential. The virtual prop corresponding to the model collision box into which the first touch point falls is defined as the base prop (also called the "base component"). The virtual prop corresponding to the model collision box into which the second touch point falls is the prop to be moved (also called the "moving component"), such as... Figure 7 , where 1 is the first landing point and 2 is the second landing point.
[0076] The specific process of aligning two virtual items using logical judgment is as follows:
[0077] The placement surface of the reference component is 'a', and the placement surface of the moving component is 'b'. First, determine if 'a' and 'b' are parallel. If not, rotate 'b' until it is parallel to 'a'. When 'a' and 'b' are parallel, project the collision boxes of the reference component and the moving component onto the placement surface directions, with projection surfaces a1 and b1 respectively. Connect the centroids of the two projection surfaces with a line L, as shown... Figure 4As shown. The line L must pass through a certain edge of a1 and b1 respectively. Respectively A and B. If the L described above just passes through a certain vertex of a1 or b1, randomly select a certain edge of the vertex as A or B. As shown Figure 5 At this time, the reference component remains stationary, and the rotating moving component is rotated until A and B are parallel.
[0078] Further, the midpoint of A and B is defined as C1 and C2. The moving component is moved to make A and B coincide, while a and b are in the same horizontal plane, and C1 and C2 coincide.
[0079] The direction of the moving process of the moving component is recorded as α. After moving the component, it is judged whether the collision boxes of the reference component and the moving component have contacted. If not, continue to move the moving component in the direction of α until the two collision boxes are in contact. This can solve the problem of aligning components with different posters and non-standard cylindrical collision boxes, as shown Figure 6 At this time, the alignment of the two components is completed, as shown Figure 8
[0080] The following situations may occur during the above alignment process and can be handled accordingly:
[0081] 1. If there is an obstacle near the reference component, so that the moving component cannot be placed there, it is judged that alignment is not possible, and a prompt text is popped up.
[0082] 2. If one or both of a1 or b1 is a circle, the moving component is moved to be tangent, as shown Figure 9
[0083] The above series of operations are program operation processes, which do not need to be displayed on the screen for the player to see. The player only needs to see the alignment result.
[0084] The above method realizes the alignment of two furniture or building modules by adding a double-finger pinch interactive gesture and a series of calculations and logical judgments. It greatly reduces the operation cost of re-placing due to misoperation when the player places furniture or builds buildings, making the operation more convenient and efficient, and improving the player's game experience.
[0085] For the above method embodiment, refer to a virtual prop placement control device as shown Figure 10 The device provides a graphical user interface through a terminal device; the graphical user interface displays a game scene including a plurality of virtual props; the device includes:
[0086] A target prop determination module 1002 is configured to determine a plurality of target props from the plurality of virtual props based on the operation touch point of the first touch operation in response to the first touch operation;
[0087] The reference prop determination module 1004 is configured to determine, in response to the second touch operation acting on at least part of the target props, a reference prop and a prop to be moved in the target props according to the first touch operation or the second touch operation.
[0088] The placement pose updating module 1006 is configured to update, according to a placement pose of the reference prop in the target props, a placement pose of the prop to be moved in the target props, so that the prop to be moved after the placement pose is updated is aligned with the reference prop according to a preset rule.
[0089] The above-described virtual prop placement control apparatus determines, in response to the first touch operation, a plurality of target props from a plurality of virtual props based on an operation touch point of the first touch operation; determines, in response to a second touch operation acting on at least part of the target props, a reference prop and a prop to be moved in the target props according to the first touch operation or the second touch operation; and updates, according to a placement pose of the reference prop in the target props, a placement pose of the prop to be moved in the target props, so that the prop to be moved after the placement pose is updated is aligned with the reference prop according to a preset rule. This way simplifies the operation of aligning virtual props in the game and improves the game experience of the player.
[0090] The above-described first touch operation includes a first sub-operation and a second sub-operation; and the target prop determination module is further configured to: in response to the first sub-operation for a first prop in the plurality of virtual props, listen to a touch point position of the first sub-operation; and in response to the touch point position of the first sub-operation being kept on the first prop and the second sub-operation for a second prop in the plurality of virtual props, determine the first prop and the second prop as the target props.
[0091] The above-described target props include a first prop and a second prop; the first touch operation includes a first sub-operation for the first prop and a second sub-operation for the second prop; and the reference prop determination module is further configured to: in response to a second touch operation acting on the first prop and / or the second prop, determine, according to a generation order of the first sub-operation and the second sub-operation, a reference prop and a prop to be moved in the first prop and the second prop.
[0092] The above-described second touch operation includes a first sliding operation continuous with the first sub-operation and a second sliding operation continuous with the second sub-operation; and the reference prop determination module is further configured to: in response to the first sliding operation acting on the first prop and the second sliding operation acting on the second prop satisfying a first condition, determine, according to a generation order of the first sub-operation and the second sub-operation, a reference prop and a prop to be moved in the first prop and the second prop; and the first condition at least includes that a sliding direction of the first sliding operation points to the second prop and / or a sliding direction of the second sliding operation points to the first prop.
[0093] The target props include a first prop and a second prop; the first touch operation includes a first sub-operation for the first prop and a second sub-operation for the second prop; the second touch operation includes a third sliding operation continuous with the first sub-operation; the reference prop determination module is further configured to: in response to the third sliding operation on the first prop satisfying a preset second condition, determine the first prop as a reference prop in the target props and determine the second prop as a prop to be moved in the target props; or, in response to the third sliding operation on the first prop satisfying the second condition, determine the first prop as the prop to be moved in the target props and determine the second prop as the reference prop in the target props; wherein the preset first condition at least includes that a sliding direction of the third sliding operation points to the second prop.
[0094] The reference prop determination module is further configured to: in response to the third sliding operation on the first prop satisfying the second condition and a touch point position of the second sub-operation staying on the second prop, determine the first prop as the reference prop in the target props and determine the second prop as the prop to be moved in the target props.
[0095] The updated placed pose of the prop to be moved aligns with the reference prop according to a preset rule, including that the updated placed pose of the prop to be moved is parallel to a placement surface of the reference prop, and a geometric center of gravity of the updated placed pose of the prop to be moved is aligned with a projection of the geometric center of gravity of the reference prop on the placement surface.
[0096] The updated placed pose of the prop to be moved aligns with the reference prop according to a preset rule, including that the updated placed pose of the prop to be moved is parallel to a placement surface of the reference prop, and a geometric center of gravity of the updated placed pose of the prop to be moved is aligned with a projection of the geometric center of gravity of the reference prop on the placement surface.
[0097] The updated placed pose of the prop to be moved aligns with the reference prop according to a preset rule, including that the updated placed pose of the prop to be moved is parallel to a placement surface of the reference prop, and a geometric center of gravity of the updated placed pose of the prop to be moved is aligned with a projection of the geometric center of gravity of the reference prop on the placement surface.
[0098] The updated placed pose of the prop to be moved aligns with the reference prop according to a preset rule, including that the updated placed pose of the prop to be moved is parallel to a placement surface of the reference prop, and a geometric center of gravity of the updated placed pose of the prop to be moved is aligned with a projection of the geometric center of gravity of the reference prop on the placement surface.
[0099] The placed pose of the virtual prop is represented by an attitude parameter of a placement surface of the virtual prop, the placement surface including a surface of the virtual prop in contact with a game scene, the attitude parameter including a plane attitude parameter, and the preset rule including that a placement surface of the prop to be moved is parallel to a placement surface of the reference prop; the placed pose updating module is further configured to: calculate a plane rotation parameter of the prop to be moved based on a plane attitude parameter of the placement surface of the reference prop and a plane attitude parameter of the placement surface of the prop to be moved; and control the prop to be moved to rotate according to the plane rotation parameter, so that the placement surface of the prop to be moved is parallel to the placement surface of the reference prop.
[0100] The posture parameter further includes a normal posture parameter; the preset rule further includes that a specified edge of a projection surface of the to-be-moved prop is parallel to a specified edge of a projection surface of the reference prop; and the device further includes: a projection surface acquisition module, configured to acquire a first projection surface of a bounding box of the reference prop on a placement surface of the reference prop and a second projection surface of a bounding box of the to-be-moved prop on a placement surface of the to-be-moved prop after rotation; a normal rotation parameter determination module, configured to determine a normal rotation parameter of the to-be-moved prop based on the first projection surface and the second projection surface; and a first rotation module, configured to control the to-be-moved prop to rotate according to the normal rotation parameter, so that the specified edge of the second projection surface of the to-be-moved prop is parallel to the specified edge of the first projection surface of the reference prop.
[0101] The normal rotation parameter determination module is further configured to: determine the specified edge of the second projection surface and the specified edge of the first projection surface based on a positional relationship between the second projection surface and the first projection surface; and calculate the normal rotation parameter of the to-be-moved prop based on the specified edge of the second projection surface and the specified edge of the first projection surface.
[0102] The first projection surface is a first polygon; the second projection surface is a second polygon; and the normal rotation parameter determination module is further configured to: acquire a geometric center of the first polygon and a geometric center of the second polygon; acquire a line connecting the geometric center of the second polygon and the geometric center of the first polygon; determine a first edge of the second polygon intersecting the line as the specified edge of the second projection surface; and determine a second edge of the first polygon intersecting the line as the specified edge of the first projection surface.
[0103] The device further includes a specified edge random selection module, configured to: if the line passes through a vertex of the first polygon and / or the second polygon, randomly select the specified edge of the first polygon and / or the second polygon from two edges adjacent to the vertex.
[0104] The first projection surface is a circle; the second projection surface is a third polygon; and the normal rotation parameter determination module is further configured to: acquire a geometric center of the circle and a geometric center of the third polygon; acquire a line connecting the geometric center of the circle and the geometric center of the third polygon; determine an intersection point of the circle and the line as a specified point of the first projection surface; and determine an edge of the third polygon intersecting the line as the specified edge of the second projection surface.
[0105] The first projection surface is a circle; the specified edge of the first projection surface includes a specified point of the circle; and the normal rotation parameter determination module is further configured to: determine a tangent corresponding to the specified point based on the specified point of the circle; and calculate the normal rotation parameter of the to-be-moved prop based on the tangent and the specified edge of the second projection surface.
[0106] The preset rule further includes that the placement surface of the to-be-moved prop is in the same horizontal plane as the placement surface of the reference prop, and the surface of the to-be-moved prop is in contact with the surface of the reference prop; the device further includes a first movement parameter determination module configured to calculate a distance between a plane corresponding to the placement surface of the to-be-moved prop after rotation and a plane corresponding to the placement surface of the reference prop, and determine the calculation result as a normal line movement parameter of the to-be-moved prop; a first movement module configured to control the to-be-moved prop to move according to the normal line movement parameter; a second movement parameter determination module configured to determine a plane movement parameter of the to-be-moved prop based on a line connecting a geometric center of a first projection plane of the placement surface of the to-be-moved prop after movement and a geometric center of a second projection plane of the placement surface of the reference prop; and a second movement module configured to control the to-be-moved prop to move according to the plane movement parameter until the surface of the to-be-moved prop is in contact with the surface of the reference prop.
[0107] The preset rule further includes that the geometric center of the to-be-moved prop is aligned with the projection of the placement surface of the reference prop and the projection of the geometric center of the reference prop on the placement surface; the device further includes a third movement parameter determination module configured to calculate a relative position parameter between a midpoint of a specified edge of the to-be-moved prop after movement and a midpoint of a specified edge of the reference prop, and determine the calculation result as a plane movement parameter of the to-be-moved prop; and a third movement module configured to control the to-be-moved prop to move according to the plane movement parameter until the surface of the to-be-moved prop is in contact with the surface of the reference prop.
[0108] The plane movement parameter includes a movement direction; the second movement module or the third movement module is further configured to control the to-be-moved prop to move according to the movement direction, and control the to-be-moved prop to stop moving in response to the bounding box of the to-be-moved prop colliding with the bounding box of the reference prop.
[0109] The embodiment also provides an electronic device including a processor and a memory, the memory storing machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to implement the virtual prop placement control method, for example:
[0110] In response to a first touch operation, a plurality of target props are determined from a plurality of virtual props based on an operation touch point of the first touch operation; in response to a second touch operation acting on at least part of the target props, a reference prop and a to-be-moved prop in the target props are determined according to the first touch operation or the second touch operation; and a placement pose of the to-be-moved prop in the target props is updated according to a placement pose of the reference prop in the target props, so that the to-be-moved prop after the placement pose is updated is aligned with the reference prop according to a preset rule.
[0111] The above manner simplifies the operation of aligning virtual props in a game and improves the game experience of a player.
[0112] Optionally, the first touch operation includes a first sub-operation and a second sub-operation; and in response to the first touch operation, the step of determining the target virtual props from the plurality of virtual props based on the operation touch point of the first touch operation includes: in response to the first sub-operation on a first virtual prop of the plurality of virtual props, monitoring a touch position of the first sub-operation; and in response to the touch position of the first sub-operation being located on the first virtual prop and a second sub-operation on a second virtual prop of the plurality of virtual props, determining the first virtual prop and the second virtual prop as the target virtual props.
[0113] Optionally, the target virtual props include a first virtual prop and a second virtual prop; the first touch operation includes a first sub-operation on the first virtual prop and a second sub-operation on the second virtual prop; and in response to the second touch operation on at least part of the target virtual props, the step of determining a reference virtual prop and a virtual prop to be moved from the target virtual props according to the first touch operation or the second touch operation includes: in response to the second touch operation on the first virtual prop and / or the second virtual prop, determining the reference virtual prop and the virtual prop to be moved from the first virtual prop and the second virtual prop according to the generation order of the first sub-operation and the second sub-operation.
[0114] Optionally, the second touch operation includes a first sliding operation continuous with the first sub-operation and a second sliding operation continuous with the second sub-operation; and in response to the second touch operation on the first virtual prop and / or the second virtual prop, the step of determining the reference virtual prop and the virtual prop to be moved from the first virtual prop and the second virtual prop according to the generation order of the first sub-operation and the second sub-operation includes: in response to the first sliding operation on the first virtual prop and the second sliding operation on the second virtual prop satisfying a first condition, determining the reference virtual prop and the virtual prop to be moved from the first virtual prop and the second virtual prop according to the generation order of the first sub-operation and the second sub-operation; wherein the first condition at least includes that a sliding direction of the first sliding operation points to the second virtual prop and / or a sliding direction of the second sliding operation points to the first virtual prop.
[0115] Optionally, the target virtual props include a first virtual prop and a second virtual prop; the first touch operation includes a first sub-operation on the first virtual prop and a second sub-operation on the second virtual prop; the second touch operation includes a third sliding operation continuous with the first sub-operation; and in response to the second touch operation on at least part of the target virtual props, the step of determining a reference virtual prop and a virtual prop to be moved from the target virtual props according to the first touch operation or the second touch operation includes: in response to the third sliding operation on the first virtual prop satisfying a preset second condition, determining the first virtual prop as the reference virtual prop and the second virtual prop as the virtual prop to be moved from the target virtual props; or in response to the third sliding operation on the first virtual prop satisfying a second condition, determining the first virtual prop as the virtual prop to be moved from the target virtual props and the second virtual prop as the reference virtual prop; wherein the preset first condition at least includes that a sliding direction of the third sliding operation points to the second virtual prop.
[0116] Optionally, the steps of responding to the third sliding operation acting on the first prop and satisfying the second condition, determining the first prop as the reference prop among the target props, and determining the second prop as the prop to be moved among the target props, include: responding to the third sliding operation acting on the first prop and satisfying the second condition, and the contact position of the second sub-operation remaining on the second prop, determining the first prop as the reference prop among the target props, and determining the second prop as the prop to be moved among the target props.
[0117] Optionally, the alignment of the object to be moved after the placement posture is updated with the reference object according to the preset rules includes: the object to be moved after the placement posture is updated is parallel to the placement surface of the reference object, and the projection of the geometric center of gravity of the object to be moved after the placement posture is updated onto the placement surface of the reference object is aligned with the projection of the geometric center of gravity of the reference object onto the placement surface.
[0118] Optionally, the alignment of the object to be moved after the placement posture update with the reference object according to the preset rules includes: the placement surface of the object to be moved after the placement posture update is parallel to that of the reference object, and the first plane of the object to be moved after the placement posture update coincides with the second plane of the reference object.
[0119] Optionally, the object to be moved after the above-mentioned placement posture update is located on the same placement surface as the reference object.
[0120] Optionally, the above-mentioned updating the placement posture of the object to be moved in the target object according to the placement posture of the reference object in the target object, so that the object to be moved after the placement posture is updated is aligned with the reference object according to a preset rule, further includes: updating the placement posture of the object to be moved according to the placement posture of the reference object, so that the object to be moved after the placement posture is updated is in contact with the reference object.
[0121] Optionally, the placement posture of the virtual props is represented by the posture parameters of the placement surface of the virtual props: the placement surface includes the surface of the virtual props that is in contact with the game scene; the posture parameters include planar posture parameters; the preset rules include: the placement surface of the prop to be moved is parallel to the placement surface of the reference prop; the step of updating the placement posture of the prop to be moved in the target props according to the placement posture of the reference prop in the target props includes: calculating the planar rotation parameters of the prop to be moved based on the planar posture parameters of the placement surface of the reference prop and the planar posture parameters of the placement surface of the prop to be moved; controlling the prop to be moved to rotate according to the planar rotation parameters so that the placement surface of the prop to be moved is parallel to the placement surface of the reference prop.
[0122] Optionally, the attitude parameters further include a normal attitude parameter; the preset rule further includes that a specified edge of a projection surface of the to-be-moved prop is parallel to a specified edge of a projection surface of the reference prop; after the to-be-moved prop is controlled to rotate according to the plane rotation parameter so that the placement surface of the to-be-moved prop is parallel to the placement surface of the reference prop, the method further includes: obtaining a first projection surface of a bounding box of the reference prop on the placement surface of the reference prop, and a second projection surface of a bounding box of the to-be-moved prop on the placement surface of the to-be-moved prop after rotation; determining a normal rotation parameter of the to-be-moved prop based on the first projection surface and the second projection surface; and controlling the to-be-moved prop to rotate according to the normal rotation parameter so that the specified edge of the second projection surface of the to-be-moved prop is parallel to the specified edge of the first projection surface of the reference prop.
[0123] Optionally, the step of determining the normal rotation parameter of the to-be-moved prop based on the first projection surface and the second projection surface includes: determining the specified edge of the second projection surface and the specified edge of the first projection surface based on the positional relationship between the second projection surface and the first projection surface; and calculating the normal rotation parameter of the to-be-moved prop based on the specified edge of the second projection surface and the specified edge of the first projection surface.
[0124] Optionally, the first projection surface is a first polygon, and the second projection surface is a second polygon; the step of determining the specified edge of the second projection surface and the specified edge of the first projection surface based on the positional relationship between the second projection surface and the first projection surface includes: obtaining a geometric center of the first polygon and a geometric center of the second polygon; obtaining a line connecting the geometric center of the second polygon and the geometric center of the first polygon; determining a first edge of the second polygon intersecting the line as the specified edge of the second projection surface; and determining a second edge of the first polygon intersecting the line as the specified edge of the first projection surface.
[0125] Optionally, after the line connecting the geometric center of the second polygon and the geometric center of the first polygon is obtained, the method further includes: if the line passes through a vertex of the first polygon and / or the second polygon, randomly selecting the specified edge of the first polygon and / or the second polygon from two edges adjacent to the vertex.
[0126] Optionally, the first projection surface is a circle, and the second projection surface is a third polygon; the step of determining the specified edge of the second projection surface and the specified edge of the first projection surface based on the positional relationship between the second projection surface and the first projection surface includes: obtaining a geometric center of the circle and a geometric center of the third polygon; obtaining a line connecting the geometric center of the circle and the geometric center of the third polygon; determining an intersection point of the circle and the line as a specified point of the first projection surface; and determining an edge of the third polygon intersecting the line as the specified edge of the second projection surface.
[0127] Optionally, the first projection surface is circular; the specified edge of the first projection surface comprises a specified point of the circle; and the step of calculating the normal rotation parameter of the to-be-moved prop based on the specified edge of the second projection surface and the specified edge of the first projection surface comprises: determining a tangent corresponding to the specified point based on the specified point of the circle; and calculating the normal rotation parameter of the to-be-moved prop based on the tangent and the specified edge of the second projection surface.
[0128] Optionally, the preset rule further comprises: the placement surface of the to-be-moved prop and the placement surface of the reference prop are in the same horizontal plane, and the surface of the to-be-moved prop is in contact with the surface of the reference prop; and the method further comprises: after the to-be-moved prop is controlled to rotate according to the plane rotation parameter so that the placement surface of the to-be-moved prop is parallel to the placement surface of the reference prop, calculating the distance between the plane corresponding to the placement surface of the to-be-moved prop after rotation and the plane corresponding to the placement surface of the reference prop, and determining the calculation result as the normal movement parameter of the to-be-moved prop; controlling the to-be-moved prop to move according to the normal movement parameter; determining the plane movement parameter of the to-be-moved prop based on the connection line between the geometric center of the first projection surface of the placement surface of the to-be-moved prop after movement and the geometric center of the second projection surface of the placement surface of the reference prop; and controlling the to-be-moved prop to move according to the plane movement parameter until the surface of the to-be-moved prop is in contact with the surface of the reference prop.
[0129] Optionally, the preset rule further comprises: the geometric center of the to-be-moved prop is aligned with the projection of the geometric center of the reference prop on the placement surface; and the method further comprises: after the to-be-moved prop is controlled to move according to the normal movement parameter, calculating the relative position parameter between the midpoint of the specified edge of the to-be-moved prop after movement and the midpoint of the specified edge of the reference prop, and determining the calculation result as the plane movement parameter of the to-be-moved prop; and controlling the to-be-moved prop to move according to the plane movement parameter until the surface of the to-be-moved prop is in contact with the surface of the reference prop.
[0130] Optionally, the plane movement parameter comprises a movement direction; and the step of controlling the to-be-moved prop to move according to the plane movement parameter until the surface of the to-be-moved prop is in contact with the surface of the reference prop comprises: controlling the to-be-moved prop to move according to the movement direction; and in response to the bounding box of the to-be-moved prop colliding with the bounding box of the reference prop, controlling the to-be-moved prop to stop moving.
[0131] Referring to Figure 11 As shown in the figure, the electronic device comprises a processor 100 and a memory 101, the memory 101 stores machine executable instructions capable of being executed by the processor 100, and the processor 100 executes the machine executable instructions to implement the virtual prop placement control method described above.
[0132] Further, Figure 11The electronic device shown also includes a bus 102 and a communication interface 103, the processor 100, the communication interface 103 and the memory 101 are connected through the bus 102.
[0133] The memory 101 can include a high-speed random access memory (RAM), and can also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which can be wired or wireless), and the Internet, a wide area network, a local area network, a metropolitan area network, etc. can be used. The bus 102 can be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 11 Only one bidirectional arrow is used in the figure to represent only one bus or one type of bus.
[0134] The processor 100 can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method can be completed by integrated logic circuits of hardware in the processor 100 or instructions in the form of software. The processor 100 described above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. Each method, step and logic block disclosed in the embodiment of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiment of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is mature in the art. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101, and combines the hardware to complete the steps of the method of the above embodiment.
[0135] The embodiment also provides a machine readable storage medium storing machine executable instructions, which, when invoked and executed by a processor, cause the processor to implement the virtual prop placement control method.
[0136] The virtual prop placement control method, device and electronic equipment provided by the embodiment of the application include a computer readable storage medium storing program codes, the program codes include instructions for executing the method described in the foregoing method embodiment, for example:
[0137] In response to the first touch operation, a plurality of target props are determined from the plurality of virtual props based on the operation touch point of the first touch operation; in response to a second touch operation acting on at least part of the target props, a reference prop and a prop to be moved are determined from the target props according to the first touch operation or the second touch operation; and the placement pose of the prop to be moved in the target props is updated according to the placement pose of the reference prop in the target props, so that the prop to be moved after the placement pose is updated is aligned with the reference prop according to a preset rule.
[0138] The above manner simplifies the operation of aligning virtual props in the game and improves the game experience of the player.
[0139] Optionally, the first touch operation includes a first sub-operation and a second sub-operation; and in response to the first touch operation, the plurality of target props are determined from the plurality of virtual props based on the operation touch point of the first touch operation, including: in response to the first sub-operation on a first prop in the plurality of virtual props, the touch point position of the first sub-operation is listened to; and in response to the touch point position of the first sub-operation staying on the first prop and the second sub-operation on a second prop in the plurality of virtual props, the first prop and the second prop are determined as the target props.
[0140] Optionally, the target props include the first prop and the second prop; the first touch operation includes the first sub-operation on the first prop and the second sub-operation on the second prop; and in response to the second touch operation acting on at least part of the target props, the reference prop and the prop to be moved in the target props are determined according to the first touch operation or the second touch operation, including: in response to the second touch operation acting on the first prop and / or the second prop, the reference prop and the prop to be moved in the first prop and the second prop are determined according to the generation order of the first sub-operation and the second sub-operation.
[0141] Optionally, the second touch operation includes a first sliding operation continuous with the first sub-operation, and a second sliding operation continuous with the second sub-operation; and the step of determining the reference prop and the prop to be moved from the first prop and the second prop according to the generation order of the first sub-operation and the second sub-operation in response to the second touch operation acting on the first prop and / or the second prop includes: in response to the first sliding operation acting on the first prop and the second sliding operation acting on the second prop satisfying a first condition, determining the reference prop and the prop to be moved from the first prop and the second prop according to the generation order of the first sub-operation and the second sub-operation; wherein the first condition at least includes that the sliding direction of the first sliding operation points to the second prop, and / or the sliding direction of the second sliding operation points to the first prop.
[0142] Optionally, the target props include the first prop and the second prop; the first touch operation includes a first sub-operation for the first prop and a second sub-operation for the second prop; and the second touch operation includes a third sliding operation continuous with the first sub-operation; and the step of determining the reference prop and the prop to be moved from the target props according to the first touch operation or the second touch operation in response to the second touch operation acting on at least part of the target props includes: in response to the third sliding operation acting on the first prop satisfying a preset second condition, determining the first prop as the reference prop and the second prop as the prop to be moved from the target props; or in response to the third sliding operation acting on the first prop satisfying a second condition, determining the first prop as the prop to be moved and the second prop as the reference prop from the target props; wherein the preset first condition at least includes that the sliding direction of the third sliding operation points to the second prop.
[0143] Optionally, the step of determining the reference prop and the prop to be moved from the target props in response to the third sliding operation acting on the first prop satisfying the second condition includes: in response to the third sliding operation acting on the first prop satisfying the second condition and the touch point position of the second sub-operation staying on the second prop, determining the first prop as the reference prop and the second prop as the prop to be moved from the target props.
[0144] Optionally, the step of aligning the prop to be moved after the placement pose is updated with the reference prop according to the preset rule includes: the prop to be moved after the placement pose is updated is parallel to the placement surface of the reference prop, and the geometric center of the prop to be moved after the placement pose is updated is aligned with the projection of the geometric center of the reference prop on the placement surface.
[0145] Optionally, the preset rule comprises that the placement surface of the to-be-moved prop is parallel to the placement surface of the reference prop, and the first plane of the to-be-moved prop is coincident with the second plane of the reference prop.
[0146] Optionally, the to-be-moved prop and the reference prop are located on the same placement surface.
[0147] Optionally, the preset rule comprises that the placement surface of the to-be-moved prop is parallel to the placement surface of the reference prop, and the first plane of the to-be-moved prop is coincident with the second plane of the reference prop.
[0148] Optionally, the placement pose of the virtual prop is represented by an attitude parameter of a placement surface of the virtual prop, the placement surface comprises a surface of the virtual prop in contact with the game scene, the attitude parameter comprises a plane attitude parameter, the preset rule comprises that the placement surface of the to-be-moved prop is parallel to the placement surface of the reference prop, and the step of updating the placement pose of the to-be-moved prop in the target prop according to the placement pose of the reference prop in the target prop comprises calculating a plane rotation parameter of the to-be-moved prop based on the plane attitude parameter of the placement surface of the reference prop and the plane attitude parameter of the placement surface of the to-be-moved prop, and controlling the to-be-moved prop to rotate according to the plane rotation parameter so that the placement surface of the to-be-moved prop is parallel to the placement surface of the reference prop.
[0149] Optionally, the attitude parameter further comprises a normal attitude parameter, the preset rule further comprises that a specified edge of a projection surface of the to-be-moved prop is parallel to a specified edge of a projection surface of the reference prop, and after the to-be-moved prop is controlled to rotate according to the plane rotation parameter so that the placement surface of the to-be-moved prop is parallel to the placement surface of the reference prop, the method further comprises obtaining a first projection surface of a bounding box of the reference prop on the placement surface of the reference prop and a second projection surface of a bounding box of the to-be-moved prop on the placement surface of the to-be-moved prop, determining a normal rotation parameter of the to-be-moved prop based on the first projection surface and the second projection surface, and controlling the to-be-moved prop to rotate according to the normal rotation parameter so that the specified edge of the second projection surface of the to-be-moved prop is parallel to the specified edge of the first projection surface of the reference prop.
[0150] Optionally, the step of determining the normal rotation parameter of the to-be-moved prop based on the first projection surface and the second projection surface comprises determining the specified edge of the second projection surface and the specified edge of the first projection surface based on the positional relationship between the second projection surface and the first projection surface, and calculating the normal rotation parameter of the to-be-moved prop based on the specified edge of the second projection surface and the specified edge of the first projection surface.
[0151] Optionally, the first projection face is a first polygon; the second projection face is a second polygon; based on the positional relationship between the second projection face and the first projection face, the step of determining the specified edge of the second projection face and the specified edge of the first projection face comprises: obtaining the geometric center of the first polygon and the geometric center of the second polygon; obtaining the line connecting the geometric center of the second polygon and the geometric center of the first polygon; determining the first edge of the second polygon intersecting with the line as the specified edge of the second projection face; and determining the second edge of the first polygon intersecting with the line as the specified edge of the first projection face.
[0152] Optionally, after the line connecting the geometric center of the second polygon and the geometric center of the first polygon is obtained, the method further comprises: if the line passes through the vertex of the first polygon and / or the second polygon, randomly selecting the specified edge of the first polygon and / or the second polygon from the two edges adjacent to the vertex.
[0153] Optionally, the first projection face is a circle; the second projection face is a third polygon; based on the positional relationship between the second projection face and the first projection face, the step of determining the specified edge of the second projection face and the specified edge of the first projection face comprises: obtaining the geometric center of the circle and the geometric center of the third polygon; obtaining the line connecting the geometric center of the circle and the geometric center of the third polygon; determining the intersection point of the circle and the line as the specified point of the first projection face; and determining the edge of the third polygon intersecting with the line as the specified edge of the second projection face.
[0154] Optionally, the first projection face is a circle; the specified edge of the first projection face comprises a specified point of the circle; based on the specified edge of the second projection face and the specified edge of the first projection face, the step of calculating the normal rotation parameter of the to-be-moved prop comprises: determining the tangent corresponding to the specified point based on the specified point of the circle; and calculating the normal rotation parameter of the to-be-moved prop based on the tangent and the specified edge of the second projection face.
[0155] Optionally, the preset rule further comprises: the placement face of the to-be-moved prop and the placement face of the reference prop are in the same horizontal plane, and the surface of the to-be-moved prop is in contact with the surface of the reference prop; after the to-be-moved prop is controlled to rotate according to the plane rotation parameter so that the placement face of the to-be-moved prop is parallel to the placement face of the reference prop, the method further comprises: calculating the distance between the plane corresponding to the placement face of the to-be-moved prop after rotation and the plane corresponding to the placement face of the reference prop, and determining the calculation result as the normal movement parameter of the to-be-moved prop; controlling the to-be-moved prop to move according to the normal movement parameter; based on the line connecting the geometric center of the first projection face of the to-be-moved prop on the placement face and the geometric center of the second projection face of the reference prop on the placement face, determining the plane movement parameter of the to-be-moved prop; and controlling the to-be-moved prop to move according to the plane movement parameter until the surface of the to-be-moved prop is in contact with the surface of the reference prop.
[0156] Optionally, the preset rule further includes that the projection of the geometric center of the to-be-moved prop on the placement surface of the reference prop is aligned with the projection of the geometric center of the reference prop on the placement surface; and after the to-be-moved prop is controlled to move according to the normal movement parameter, the method further includes: calculating a relative position parameter between the midpoint of the specified edge of the to-be-moved prop after movement and the midpoint of the specified edge of the reference prop, and determining the calculation result as a plane movement parameter of the to-be-moved prop; and the to-be-moved prop is controlled to move according to the plane movement parameter until the to-be-moved prop is in surface contact with the reference prop.
[0157] Optionally, the plane movement parameter includes a movement direction; and the step of controlling the to-be-moved prop to move according to the plane movement parameter until the to-be-moved prop is in surface contact with the reference prop includes: controlling the to-be-moved prop to move according to the movement direction; and in response to the bounding box of the to-be-moved prop colliding with the bounding box of the reference prop, controlling the to-be-moved prop to stop moving.
[0158] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0159] In addition, in the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connection" and "connection" should be understood in a broad sense, for example, can be fixedly connected, can also be detachably connected, or integrally connected; can be mechanically connected, can also be electrically connected; can be directly connected, can also be indirectly connected through an intermediate medium, and can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0160] The functions described above, if realized in the form of software function units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the part of the present application that essentially contributes to the prior art or the part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.
[0161] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.
[0162] Finally, it should be noted that the above embodiments are only specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, and are not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily think of changes to the technical solutions recorded in the foregoing embodiments within the technical scope disclosed by the present application, or make equivalent substitutions for some technical features; and these modifications, changes or substitutions do not cause the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for controlling the placement of virtual props, characterized in that, A graphical user interface is provided via a terminal device; the graphical user interface displays a game scene including multiple virtual props; the method includes: In response to a first touch operation, based on the operation touch point of the first touch operation, a plurality of target props are determined from the plurality of virtual props; In response to a second touch operation applied to at least a portion of the target props, a reference prop and a prop to be moved in the target props are determined based on the first touch operation or the second touch operation; Based on the placement of the reference item in the target item, update the placement of the item to be moved in the target item so that the item to be moved after the placement is updated is aligned with the reference item according to a preset rule. The target props include a first prop and a second prop; the first touch operation includes a first sub-operation for the first prop and a second sub-operation for the second prop; The step of responding to a second touch operation applied to at least a portion of the target props, and determining a reference prop and a prop to be moved within the target props based on the first touch operation or the second touch operation, includes: In response to a second touch operation applied to the first prop and / or the second prop, the reference prop and the prop to be moved in the first prop and the second prop are determined according to the generation order of the first sub-operation and the second sub-operation. Alternatively, in response to a second touch operation acting on at least a portion of the target props, the step of determining a reference prop and a prop to be moved within the target props based on the first touch operation or the second touch operation includes: The second touch operation includes a third swipe operation that is consecutive to the first sub-operation; When the third sliding operation applied to the first prop satisfies the preset second condition, the first prop is determined as the reference prop among the target props, and the second prop is determined as the prop to be moved among the target props; Alternatively, in response to a third sliding operation acting on the first prop satisfying the second condition, the first prop is determined as the prop to be moved among the target props, and the second prop is determined as the reference prop among the target props; The preset second condition includes at least the following: the sliding direction of the third sliding operation points to the second prop.
2. The method according to claim 1, characterized in that, The step of determining multiple target props from the plurality of virtual props in response to a first touch operation, based on the operation touch point of the first touch operation, includes: In response to a first sub-operation on a first item among a plurality of said virtual items, the touch point position of the first sub-operation is monitored; In response to the touch position of the first sub-operation stopping at the first prop, and the second sub-operation targeting the second prop among the plurality of virtual props, the first prop and the second prop are identified as target props.
3. The method according to claim 1, characterized in that, The second touch operation includes a first swipe operation that is consecutive to the first sub-operation, and a second swipe operation that is consecutive to the second sub-operation; In response to a second touch operation applied to the first prop and / or the second prop, the steps of determining the reference prop and the prop to be moved among the first prop and the second prop according to the order in which the first sub-operation and the second sub-operation are generated include: In response to the first sliding operation acting on the first prop and the second sliding operation acting on the second prop satisfying the first condition, the reference prop and the prop to be moved in the first prop and the second prop are determined according to the generation order of the first sub-operation and the second sub-operation. The first condition includes at least: the sliding direction of the first sliding operation points to the second prop, and / or the sliding direction of the second sliding operation points to the first prop.
4. The method according to claim 1, characterized in that, The steps of determining the first item as the reference item among the target items and determining the second item as the item to be moved among the target items in response to a third sliding operation acting on the first item satisfying a second condition include: When a third sliding operation applied to the first prop satisfies the second condition, and the contact point of the second sub-operation remains on the second prop, the first prop is determined as the reference prop among the target props, and the second prop is determined as the prop to be moved among the target props.
5. The method according to claim 1, characterized in that, The alignment of the object to be moved with the reference object according to the preset rules after the placement posture is updated includes: After the placement posture is updated, the object to be moved is parallel to the placement surface of the reference object, and the projection of the geometric center of gravity of the object to be moved onto the placement surface of the reference object is aligned with the projection of the geometric center of gravity of the reference object onto the placement surface.
6. The method according to claim 1, characterized in that, The alignment of the object to be moved with the reference object according to the preset rules after the placement posture is updated includes: After the placement posture is updated, the object to be moved is parallel to the placement surface of the reference object, and the first plane of the object to be moved after the placement posture is updated coincides with the second plane of the reference object.
7. The method according to claim 5 or 6, characterized in that, The moved prop, after its placement posture is updated, is located on the same placement surface as the reference prop.
8. The method according to claim 5 or 6, characterized in that, The step of updating the placement posture of the object to be moved in the target object according to the placement posture of the reference object in the target object, so that the object to be moved after the placement posture is updated is aligned with the reference object according to a preset rule, further includes: Based on the placement of the reference prop, update the placement of the prop to be moved so that the prop to be moved, after the placement is updated, comes into contact with the reference prop.
9. The method according to claim 1, characterized in that, The placement posture of the virtual prop is represented by the posture parameters of the placement surface of the virtual prop: the placement surface includes the surface of the virtual prop that is in contact with the game scene; The attitude parameters include planar attitude parameters; The preset rule includes: the placement surface of the prop to be moved is parallel to the placement surface of the reference prop; The step of updating the placement of the object to be moved in the target object based on the placement of the reference object in the target object includes: Based on the planar attitude parameters of the placement surface of the reference prop and the planar attitude parameters of the placement surface of the prop to be moved, the planar rotation parameters of the prop to be moved are calculated. The prop to be moved is controlled to rotate according to the plane rotation parameters so that the placement surface of the prop to be moved is parallel to the placement surface of the reference prop.
10. The method according to claim 9, characterized in that, The attitude parameters also include normal attitude parameters; the preset rules also include: a specified edge of the projection surface of the prop to be moved is parallel to a specified edge of the projection surface of the reference prop; After controlling the prop to be moved to rotate according to the planar rotation parameters so that the placement surface of the prop to be moved is parallel to the placement surface of the reference prop, the method further includes: Obtain the first projection surface of the bounding box of the reference prop on the placement surface of the reference prop, and the second projection surface of the bounding box of the prop to be moved after rotation on the placement surface of the prop to be moved. Based on the first projection plane and the second projection plane, determine the normal rotation parameters of the prop to be moved; The prop to be moved is controlled to rotate according to the normal rotation parameters so that a specified edge of the second projection surface of the prop to be moved is parallel to a specified edge of the first projection surface of the reference prop.
11. The method according to claim 10, characterized in that, The step of determining the normal rotation parameters of the prop to be moved based on the first projection plane and the second projection plane includes: Based on the positional relationship between the second projection plane and the first projection plane, a specified edge of the second projection plane and a specified edge of the first projection plane are determined. The normal rotation parameters of the prop to be moved are calculated based on the specified edges of the second projection plane and the first projection plane.
12. The method according to claim 10, characterized in that, The first projection plane is a first polygon; the second projection plane is a second polygon; The step of determining a specified edge of the second projection plane and a specified edge of the first projection plane based on the positional relationship between the second projection plane and the first projection plane includes: Obtain the geometric centroid of the first polygon and the geometric centroid of the second polygon; Obtain the line connecting the geometric centroid of the second polygon and the geometric centroid of the first polygon; The first edge of the second polygon that intersects with the connecting line is determined as the designated edge of the second projection plane; The second side of the first polygon that intersects with the connecting line is determined as the designated side of the first projection plane.
13. The method according to claim 12, characterized in that, After obtaining the line connecting the geometric centroid of the second polygon and the geometric centroid of the first polygon, the method further includes: If the connecting line passes through a vertex of the first polygon and / or the second polygon, a specified edge of the first polygon and / or the second polygon is randomly selected from the two edges adjacent to the vertex.
14. The method according to claim 10, characterized in that, The first projection plane is circular; the second projection plane is a third polygon. The step of determining a specified edge of the second projection plane and a specified edge of the first projection plane based on the positional relationship between the second projection plane and the first projection plane includes: Obtain the geometric centroid of the circle and the geometric centroid of the third polygon; Obtain the line connecting the geometric centroid of the circle and the geometric centroid of the third polygon; The intersection point of the circle and the connecting line is determined as the designated point of the first projection plane; The edge in the third polygon that intersects with the connecting line is determined as the designated edge of the second projection plane.
15. The method according to claim 10, characterized in that, The first projection surface is circular; a designated edge of the first projection surface includes a designated point of the circle; The step of calculating the normal rotation parameters of the prop to be moved based on a specified edge of the second projection plane and a specified edge of the first projection plane includes: Based on a specified point of the circle, determine the tangent line corresponding to the specified point; Based on the tangent and the specified edge of the second projection plane, the normal rotation parameters of the prop to be moved are calculated.
16. The method according to claim 9, characterized in that, The preset rules also include: the placement surface of the prop to be moved is on the same horizontal plane as the placement surface of the reference prop, and the surface of the prop to be moved is in contact with the surface of the reference prop; After controlling the prop to be moved to rotate according to the planar rotation parameters so that the placement surface of the prop to be moved is parallel to the placement surface of the reference prop, the method further includes: Calculate the distance between the plane corresponding to the placement surface of the rotated prop and the plane corresponding to the placement surface of the reference prop, and determine the calculation result as the normal movement parameter of the prop to be moved; Control the prop to be moved to move according to the normal movement parameters; Based on the line connecting the geometric centroid of the prop to be moved on the first projection plane of the placement surface and the geometric centroid of the reference prop on the second projection plane of the placement surface, the planar movement parameters of the prop to be moved are determined. Control the prop to be moved to move according to the planar movement parameters until the prop to be moved contacts the surface of the reference prop.
17. The method according to claim 16, characterized in that, The preset rule also includes: the projection of the geometric center of gravity of the prop to be moved onto the placement surface of the reference prop is aligned with the projection of the geometric center of gravity of the reference prop onto the placement surface. After controlling the object to be moved to move according to the normal movement parameters, the method further includes: Calculate the relative position parameters between the midpoint of the specified edge of the moved prop and the midpoint of the specified edge of the reference prop, and determine the calculation result as the planar movement parameters of the moved prop. Control the prop to be moved to move according to the planar movement parameters until the prop to be moved contacts the surface of the reference prop.
18. The method according to claim 16 or 17, characterized in that, The planar movement parameters include the direction of movement; The step of controlling the prop to be moved to move according to the planar movement parameters until the prop to be moved contacts the surface of the reference prop includes: Control the prop to be moved to move in the moving direction; In response to the collision between the bounding box of the object to be moved and the bounding box of the reference object, the object to be moved is controlled to stop moving.
19. A device for controlling the placement of virtual props, characterized in that, A graphical user interface is provided through the terminal device; The graphical user interface displays a game scene including multiple virtual props; the device includes: The target prop determination module is used to respond to a first touch operation and determine multiple target props from the multiple virtual props based on the operation touch point of the first touch operation; A reference prop determination module is configured to respond to a second touch operation applied to at least a portion of the target props, and determine a reference prop and a prop to be moved among the target props based on the first touch operation or the second touch operation; The placement posture update module is used to update the placement posture of the object to be moved in the target object according to the placement posture of the reference object in the target object, so that the object to be moved after the placement posture update is aligned with the reference object according to a preset rule. The target props include a first prop and a second prop; the first touch operation includes a first sub-operation for the first prop and a second sub-operation for the second prop; The reference prop determination module is also used for: In response to a second touch operation applied to the first prop and / or the second prop, the reference prop and the prop to be moved in the first prop and the second prop are determined according to the generation order of the first sub-operation and the second sub-operation. Alternatively, the reference prop determination module is also used for: The second touch operation includes a third swipe operation that is consecutive to the first sub-operation; When the third sliding operation applied to the first prop satisfies the preset second condition, the first prop is determined as the reference prop among the target props, and the second prop is determined as the prop to be moved among the target props; Alternatively, in response to a third sliding operation acting on the first prop satisfying the second condition, the first prop is determined as the prop to be moved among the target props, and the second prop is determined as the reference prop among the target props; The preset second condition includes at least the following: the sliding direction of the third sliding operation points to the second prop.
20. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the virtual prop placement control method according to any one of claims 1-18.
21. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the virtual prop placement control method according to any one of claims 1-18.