Virtual object setting method and apparatus, medium, electronic device, and program product
By selecting the locking range and initial editing point in the virtual scene and determining the object setting area, the problem of low object positioning efficiency in three-dimensional space is solved, efficient and accurate virtual object setting is achieved, and the user experience is improved.
Patent Information
- Application Number
- PCT/CN2024/107609
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-25
- Filing Date
- 2024-07-25
- Publication Date
- 2025-10-02
AI Technical Summary
It is inefficient to accurately locate the position pointed by the user in three-dimensional space and draw a three-dimensional shape. The existing technology requires the user to build continuous auxiliary lines for auxiliary positioning, which is inefficient.
By selecting the locking range and initial editing point in the virtual scene, the object setting area is determined, and the movement and setting of the virtual object in the area are controlled in response to user operations, including locking the axis range and plane range. Combined with the perspective management of the virtual camera, precise positioning and drawing of the virtual object can be achieved.
It improves the efficiency and accuracy of object setting in three-dimensional space, simplifies the operation process, and enhances the user's gaming experience and visual intuition.
Smart Images

Figure CN2024107609_02102025_PF_FP_ABST
Abstract
Description
Method, device, medium, electronic device and program product for setting virtual objects
[0001] This application claims priority to Chinese Patent Application No. 202410346505.7 filed on March 25, 2024, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field
[0002] Embodiments of the present disclosure relate to a method, apparatus, medium, electronic device, and program product for setting a virtual object. Background Art
[0003] Arranging objects in three-dimensional space presents a thorny problem: precisely locating the user's pointing location and drawing the three-dimensional shape. Related technologies often require users to build continuous auxiliary lines to assist in positioning, then delete the auxiliary lines after the construction is complete. However, this method is extremely inefficient and cannot quickly arrange objects in three-dimensional space.
[0004] Summary of the Invention
[0005] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0006] In a first aspect, the present disclosure provides a method for setting a virtual object, comprising:
[0007] Display virtual scenes;
[0008] Determining an object setting area in the virtual scene according to a locking range and a first initial editing point selected in the virtual scene, wherein the locking range includes an axis range and a plane range;
[0009] In response to a movement operation on a first virtual object in the virtual scene, controlling the first virtual object to move within the object setting area; and
[0010] In response to a setting instruction, the first virtual object is set at a target edit point in the object setting area.
[0011] In a second aspect, the present disclosure provides a device for setting a virtual object, comprising:
[0012] Display module, displaying virtual scenes;
[0013] a determination module configured to determine an object setting area in the virtual scene according to a locking range selected in the virtual scene and a first initial editing point, wherein the locking range includes an axis range and a plane range;
[0014] A control module configured to control a first virtual object in the virtual scene to move within the object setting area in response to a movement operation on the first virtual object;
[0015] The setting module is configured to set the first virtual object at a target editing point in the object setting area in response to a setting instruction.
[0016] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when executed by a processing device.
[0017] In a fourth aspect, the present disclosure provides an electronic device, comprising:
[0018] a storage device having a computer program stored thereon;
[0019] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.
[0020] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program, which implements the steps of the method described in the first aspect when executed by a processor.
[0021] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings:
[0023] FIG1 is a flowchart of a method for setting a virtual object according to some embodiments;
[0024] FIG2 is a schematic diagram of a first virtual object according to some embodiments;
[0025] FIG3 is a schematic diagram showing an object setting area according to some embodiments;
[0026] FIG4 is a flowchart illustrating a method for determining a first initial edit point according to some embodiments;
[0027] FIG5 is a schematic diagram illustrating a first initial editing point according to some embodiments;
[0028] FIG6 is a schematic diagram showing an object setting area according to some embodiments;
[0029] FIG7 is a detailed flow chart of step 140 shown in FIG1 ;
[0030] FIG8 is a flow chart showing a method for determining a locking range according to an exemplary embodiment;
[0031] FIG9 is a schematic structural diagram of a device for setting a virtual object according to some embodiments; and
[0032] FIG10 is a schematic structural diagram of an electronic device according to some embodiments. DETAILED DESCRIPTION
[0033] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0034] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0035] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0036] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0037] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0038] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0039] Figure 1 is a flowchart illustrating a method for configuring a virtual object according to some embodiments. As shown in Figure 1 , embodiments of the present disclosure provide a method for configuring a virtual object. This method can be performed by an electronic device, specifically, by a virtual object configuration device. This device can be implemented in software and / or hardware and configured in the electronic device. As shown in Figure 1 , this method can include the following steps.
[0040] In step 110 , a virtual scene is displayed.
[0041] Here, the virtual scene may be a three-dimensional virtual scene, such as a three-dimensional game scene, a virtual reality scene, etc. It should be understood that the virtual scene displayed by the electronic device may be a picture obtained by a virtual camera in the virtual scene.
[0042] Among them, the virtual camera refers to a technology that simulates the movement and perspective management of a real camera. It is responsible for determining the content and viewing angle of the player in the virtual scene. The virtual camera can dynamically adjust parameters such as the lens position, direction, focal length, and field of view to provide the best gaming visual experience. In other words, the virtual camera is a core component used to control the player's visual perception in game development. It greatly affects the game's visual narrative and gameplay experience. For example, if the user moves the virtual camera from the left to the right, it means that the user wants to look at the right side of the virtual scene, and the content presented is the content on the right side of the virtual scene.
[0043] In step 120 , an object setting area is determined in the virtual scene according to the locked range selected in the virtual scene and the first initial editing point.
[0044] Here, the locked range can be a range selected by the user in the virtual scene. The locked range can include an axis range and a plane range. That is, the locked range can be an axial range or a plane range in the virtual scene. It should be understood that the locked range means that the first virtual object will be fixed in the area corresponding to the locked range in the virtual scene for movement and drawing.
[0045] For example, a virtual scene can be constructed using a first coordinate axis, a second coordinate axis, and a third coordinate axis, where the first coordinate axis, the second coordinate axis, and the third coordinate axis can be the X-axis, the Y-axis, and the Z-axis, respectively. If the user selects the X-axis among the X-axis, the Y-axis, and the Z-axis through a locking operation, the X-axis is the locking range. In other words, the first virtual object will be fixed on the X-axis of the virtual scene for movement. If the user selects the X-axis and the Z-axis among the X-axis, the Y-axis, and the Z-axis through a locking operation, the plane enclosed by the X-axis and the Z-axis is the locking range. In other words, the first virtual object will be fixed on the plane enclosed by the X-axis and the Z-axis for movement and drawing.
[0046] The first initial editing point is a point selected by the user in the virtual scene. For example, when the user needs to set a virtual object at a certain point in the virtual space, the user can select a point in the virtual scene.
[0047] For example, the first initial editing point can be determined by the cursor point displayed on the screen. Since the locking range is a general range in the virtual space, it is impossible to determine a precise range. For example, when the user selects the X-axis as the locking range, countless X-axis locking ranges can be located in the virtual scene. When the user selects the plane surrounded by the X-axis and the Z-axis as the locking range, countless X-axis and Z-axis planes can be located in the virtual scene. Therefore, the object setting area can be determined in the virtual scene based on the locking range and the first initial editing point.
[0048] The object setting area refers to the range in which the first virtual object can be moved and drawn in the virtual space. That is, the first virtual object will be fixed in the area corresponding to the object setting area in the virtual scene for movement and drawing.
[0049] It is worth noting that a first initial edit point can be located in the virtual scene by pointing the cursor on the screen. Then, the first initial edit point, combined with the lock range, can determine a unique object setting area in the virtual scene. For example, the coordinates of the cursor point on the screen mapped to the first initial edit point are (5, 5, 5). If the user selects the X-axis as the lock range, then in the virtual scene, the X-axis passing through the first initial edit point with coordinates (5, 5, 5) is the object setting area. If the user selects the plane enclosed by the X-axis and the Z-axis as the lock range, then in the virtual scene, the plane including the first initial edit point with coordinates (5, 5, 5) and enclosed by the X-axis and the Z-axis is the object setting area.
[0050] It should be noted that in the embodiments of the present disclosure, the electronic device can be a fixed terminal such as a digital TV or desktop computer, or a mobile terminal such as a virtual reality device, a mobile phone, or a tablet computer. Therefore, in the embodiments of the present disclosure, the cursor point can refer to either the cursor point of a mouse or the touch point on a touch screen.
[0051] In step 130 , in response to a movement operation on a first virtual object in a virtual scene, the first virtual object is controlled to move within an object setting area.
[0052] Here, the virtual object can be a virtual object set in a virtual scene. It should be understood that the virtual object referred to in this disclosure can be a block or an object of any structure, such as stairs, fences, street lights, telephone poles, roads, trees, etc.
[0053] Exemplarily, the electronic device may display a first virtual object in the virtual scene in response to the scene building operation.
[0054] The scene-building operation can be a user-triggered operation for instructing the placement of virtual objects in a virtual scene. Through the scene-building operation, the user can enable the function of placing objects in the virtual scene. It should be noted that the scene-building operation can be triggered in various ways, which are not limited in this disclosure. For example, it can be triggered by a shortcut key or by clicking a specific function button.
[0055] Exemplarily, when the electronic device detects a scene building operation, it displays a first virtual object to be set in the virtual scene in response to the scene building operation. The first virtual object may be an object selected by the user to be set in the virtual scene. For example, when the user wants to build a house in the virtual scene, the user can select the first virtual object used to build the house through the scene building operation, thereby displaying the first virtual object to be set in the virtual scene.
[0056] It is worth noting that the first virtual object to be set has not yet been materialized in the virtual scene. It will only be materialized in the virtual scene after the user confirms the setting of the virtual object. Of course, the user can control the movement of the first virtual object in the virtual scene using a mouse or touch track, thereby setting the first virtual object at any position in the virtual scene.
[0057] Figure 2 is a schematic diagram illustrating a first virtual object according to some embodiments. As shown in Figure 2, in response to a scene construction operation, the electronic device displays a first virtual object 202 in a virtual scene 201, and a user can control the movement of the first virtual object 202 in the virtual scene by using a corresponding mouse cursor point 203.
[0058] The first virtual object is set to move following the cursor point. Accordingly, the cursor point can be moved by a moving operation, thereby controlling the first virtual object to move within the object setting area.
[0059] It should be understood that no matter which direction the user moves the cursor, the first virtual object will be locked within the object setting area and will not move outside the object setting area. In other words, even if the cursor point moves randomly on the screen, the first virtual object will be corrected to move within the object setting area, allowing the user to accurately locate the first virtual object in the three-dimensional virtual scene without the jitter of the cursor point causing the set first virtual object to shift.
[0060] For example, when the user needs to draw a straight line on the X-axis of the virtual scene, the user can select the X-axis as the locking range, and the object setting area is the X-axis of the first initial editing point corresponding to the cursor point in the virtual scene. Accordingly, since the first virtual object is locked on the object setting area for movement, even if the movement trajectory of the cursor point on the screen is not a straight line, a straight line can be drawn on the X-axis.
[0061] It is worth noting that, for different application scenarios, the user can move the cursor point in different ways, for example, by using a mouse or by touching a track on the screen.
[0062] Figure 3 is a schematic diagram illustrating an object setting area according to some embodiments. As shown in Figure 3 , a first virtual object 202 is displayed in a virtual scene 201. A user can control the movement of the first virtual object 202 within the object setting area 301 by using a cursor point 203. The object setting area 301 is constructed by a plane bounded by the X-axis and the Z-axis. It should be understood that the size of the object setting area 301 shown in Figure 3 is merely an example and does not necessarily mean that the size of the object setting area 301 must be the size shown in Figure 3 .
[0063] In step 140 , in response to the setting instruction, a first virtual object is set at a target editing point in the object setting area.
[0064] Here, the setting instruction may be a user-triggered instruction for instructing to set the first virtual object at a target edit point within the object setting area. The setting instruction may be triggered in different ways for different application scenarios. For example, if the cursor point is a mouse cursor point, the setting instruction may be triggered by clicking the mouse.
[0065] During the movement of the first virtual object, the user can trigger a setting instruction to determine to set the first virtual object at the target editing point corresponding to the object setting area, and then the electronic device physically draws a first virtual object at the target editing point.
[0066] The target editing point is the point on the object setting area to which the cursor is mapped when the setting instruction is triggered. It should be understood that since the first virtual object is confined within the object setting area, no matter how the cursor moves on the screen, the point on the virtual scene to which the cursor is mapped will be corrected to within the object setting area. For example, when the cursor moves on the screen, the cursor point on the screen is a two-dimensional coordinate. The cursor point can be first mapped to a three-dimensional virtual scene to obtain a second initial editing point of the cursor point in the virtual scene. Then, based on the object setting area, the second initial editing point can be corrected to within the range of the object setting area to obtain the three-dimensional coordinates of the target editing point, thereby setting the first object at the three-dimensional coordinates.
[0067] 3 , the user can control the movement of the first virtual object 202 in the object setting area 301 by using the cursor point 203 to set the virtual object at a desired location. The user can set the first virtual object 202 at any location in the object setting area 301 by triggering a setting instruction.
[0068] It is worth noting that during the movement of the first virtual object, if the user continuously triggers the setting command, multiple first virtual objects can be drawn continuously at multiple consecutive target editing points. In other words, a straight line consisting of the first virtual objects can be drawn in the virtual scene.
[0069] It should be noted that step 130 and step 140 can be performed simultaneously, or step 130 can be performed separately. In other words, the user can control the movement of the first virtual object within the object setting area through step 130 without setting the first virtual object in the virtual scene through step 140.
[0070] Therefore, by displaying a virtual scene, an object setting area is determined in the virtual scene according to the locking range and the first initial editing point selected in the virtual scene, wherein the locking range includes the axis range and the plane range, and in response to the movement operation of the first virtual object in the virtual scene, the first virtual object is controlled to move within the object setting area, and in response to the setting instruction, the first virtual object is set at the target editing point in the object setting area, which can efficiently and accurately locate any position in the virtual scene, thereby better assisting the user in building objects in the virtual scene, greatly improving the user's gaming experience, and the operation is simple and in line with the user's visual intuition.
[0071] In some feasible implementations, when the lock range is switched, the cursor point may be controlled to be displayed on the first virtual object to be set.
[0072] Here, switching the lock range can mean that the user switches the lock range to another lock range. For example, if the X-axis is the initial lock range and the user wants to draw on the Y-axis, the lock range needs to be switched from the X-axis to the Y-axis. For another example, if the X-axis is the initial lock range and the user wants to draw on the plane enclosed by the X-axis and the Z-axis, the lock range needs to be switched from the X-axis to the plane enclosed by the X-axis and the Z-axis.
[0073] It should be understood that since the first virtual object is confined to the object setting area corresponding to the lock range, when the lock range is switched, the object setting area will also change, and the first virtual object will need to be moved to the new object setting area accordingly. To ensure that the first virtual object can move with the cursor point, when the lock range is switched, the electronic device can control the cursor point to be displayed on the first virtual object to be set, so that the first virtual object and the cursor point can move together without offset, thereby making the setting of virtual objects in the virtual scene more in line with the user's visual intuition.
[0074] In some embodiments, the position of the first virtual object to be set may be kept unchanged, and the cursor point may be controlled to move to the center point of the first virtual object to be set.
[0075] When the lock range is switched, the electronic device moves the cursor point to the center point of the first virtual object. In other words, when the lock range is switched, the first virtual object to be set does not move, but the cursor point is moved to the center point of the first virtual object so that the cursor point and the first virtual object can continue to move with it.
[0076] For example, if the X-axis is the initial locked range, and the user wants to change the drawing to the plane bounded by the X-axis and the Z-axis, the locked range needs to be switched from the X-axis to the plane bounded by the X-axis and the Z-axis. In this case, the position of the first virtual object remains unchanged, and the cursor is then moved to the center point of the first virtual object to be set.
[0077] Based on this, by maintaining the position of the first virtual object to be set unchanged, and moving the cursor point so that the cursor point and the first virtual object can follow the movement, the first virtual object can be prevented from jumping in the virtual scene, thereby avoiding incorrect drawing of the virtual object in the virtual scene.
[0078] In some other embodiments, when the lock range is switched, the position of the cursor point can be kept unchanged, and the first virtual object can be controlled to move to the position of the cursor point.
[0079] In other embodiments, when switching the lock range, if the position of the cursor point does not change, the position of the first virtual object is kept unchanged; if the position of the cursor point changes, the first virtual object is controlled to move to the position of the cursor point.
[0080] Therefore, through the above implementation, the first virtual object can be made to move along with the cursor point, which is more visually in line with the user's intuition and can greatly improve the user experience.
[0081] In some feasible implementations, an object setting area may also be displayed in the virtual scene.
[0082] Here, as shown in FIG3 , the object setting area 301 is constructed by a plane bounded by the X-axis and the Z-axis, and the object setting area 301 can be displayed in the virtual scene 201. It should be understood that the object setting area 301 can be displayed in the virtual scene 201 using a specific color, or can be displayed in other ways, such as shading or wireframe.
[0083] Therefore, by displaying the object setting area in the virtual scene, the user can intuitively understand the object setting area, thereby assisting the user to better perform object setting in the virtual scene.
[0084] In some feasible implementations, a first initial editing point may be determined based on a cursor point displayed on the screen, wherein the first initial editing point is a position where the cursor point is mapped in the virtual scene.
[0085] Here, as in the above embodiment, the first initial edit point is the position of the cursor point displayed on the screen mapped in the virtual scene. It should be understood that the first initial edit point actually refers to the position in the virtual scene pointed to by the user's cursor point. For example, assuming the cursor point is the mouse cursor point, the first initial edit point refers to the position in the virtual scene selected by the user with the mouse cursor point.
[0086] FIG4 is a flow chart illustrating a method for determining a first initial edit point according to some embodiments. As shown in FIG4 , in some achievable implementations, the first initial edit point may be determined by the following steps:
[0087] In step 401 , a first ray is determined in the virtual scene according to a virtual camera and a cursor point in the virtual scene.
[0088] Here, the three-dimensional coordinates of the virtual camera in the virtual scene can be determined, and then a first ray including the position of the virtual camera and the position of the cursor point can be constructed in the virtual scene based on the three-dimensional coordinates of the virtual camera and the two-dimensional coordinates of the cursor point on the screen.
[0089] In step 402, a first initial editing point is determined according to an intersection point between the first ray and a second virtual object in the virtual scene.
[0090] Here, based on the first ray, an intersection point between the first ray and the second virtual object in the virtual scene is obtained, and the intersection point between the first ray and the second virtual object in the virtual scene is determined as the first initial editing point.
[0091] It is worth noting that the second virtual object in the virtual scene can be a virtual object set by the user in the virtual scene, or can be an object in the virtual scene itself. For example, the second virtual object can be the ground in the virtual scene.
[0092] Figure 5 is a schematic diagram illustrating a first initial edit point according to some embodiments. As shown in Figure 5 , based on the position of a virtual camera 501 and a cursor point 502, a first ray 503 is constructed that passes through the virtual camera 501 and the cursor point 502. Then, based on the first ray 503 and the second virtual object in the virtual scene 202, the intersection point between the first ray 503 and the second virtual object in the virtual scene 202 is determined. This intersection point is then determined as the first initial edit point 504.
[0093] It is worth noting that since the virtual camera can determine the picture content and observation angle seen by the player in the virtual scene, determining the first initial editing point where the cursor point is mapped in the virtual scene through the virtual camera and the cursor point can truly reflect the position where the user wants to locate the cursor point in the virtual scene, thereby accurately locating the first initial editing point where the user wants to set the object in the virtual scene.
[0094] Therefore, through the above embodiment, the first initial editing point where the user wishes to set an object can be accurately located in the virtual scene.
[0095] In the embodiment of the present disclosure, the locking range may be an axial range in the virtual scene or a plane range in the virtual scene. The locking range may be moved to the first initial editing point to obtain an object setting area.
[0096] For example, suppose the user selects the Z axis as the lock range among the X, Y, and Z axes through the lock operation. Since countless Z axes can be located in the virtual scene, in order to accurately locate the object setting area that the user actually needs, the Z axis can be moved to the position of the first initial edit point to obtain the object setting area. As shown in Figure 5, the object setting area 505 is actually a Z axis that passes through the first initial edit point 504.
[0097] For another example, if the user selects the X-axis and the Z-axis among the X-axis, Y-axis, and Z-axis through the lock operation, the plane enclosed by the X-axis and the Z-axis will be the lock range. Since countless planes enclosed by the X-axis and the Z-axis can be located in the virtual scene, in order to accurately locate the object setting area that the user actually needs, the plane enclosed by the X-axis and the Z-axis can be moved to the location of the first initial edit point to obtain the object setting area. In other words, the object setting area is actually a plane enclosed by the X-axis and the Z-axis that includes the first initial edit point.
[0098] In some feasible implementations, when the locking range is an axis range, the object setting area is determined according to a first setting direction and a first initial editing point selected on the axis range.
[0099] The axis range may refer to one or more of the first, second, and third coordinate axes in the virtual scene. If the locked range is an axial range, it means that the user wishes to set a virtual object on the axis of the virtual scene.
[0100] The first setting direction can be determined by the orientation of the virtual camera. In other words, the first setting direction can be the orientation of the virtual camera. For example, assuming that the axis range is the X-axis, when the orientation of the virtual camera is biased to the right, the first setting direction is the positive direction of the X-axis. When the orientation of the virtual camera is biased to the left, the first setting direction is the negative direction of the X-axis. When the orientation of the virtual camera is not offset, the first setting direction is the positive direction and the negative direction of the X-axis.
[0101] That is to say, the first set direction on the axis range refers to the direction in which the orientation of the virtual scene is mapped on the axis range.
[0102] For example, the axis range selected by the user can be moved to the location of the first initial editing point to obtain a new axis range, and then the axis range in the first setting direction on the new axis range that matches the orientation of the virtual camera is determined as the object setting area.
[0103] As shown in FIG5 , assuming that the first setting direction within the axis range is the positive Z-axis direction, the object setting area 505 is the Z-axis range corresponding to the positive Z-axis direction passing through the first initial edit point 504. It should be understood that in this case, the first virtual object 202 is restricted to movement and drawing within the Z-axis range corresponding to the positive Z-axis direction passing through the first initial edit point 504.
[0104] In some feasible implementations, when the locked range is a plane range, the object setting area is determined according to the second setting direction selected on the plane range and the first initial editing point.
[0105] The concepts of the second setting direction and the first setting direction are the same, and reference may be made to the relevant description of the above embodiment, which will not be repeated here.
[0106] For example, the plane range selected by the user can be moved to the location of the first initial editing point to obtain a new plane range, and then the plane range in the second setting direction on the new plane range that matches the orientation of the virtual camera is determined as the object setting area.
[0107] Figure 6 is a schematic diagram illustrating an object setting area according to some embodiments. As shown in Figure 6, assuming that the second setting direction in the plane range is the positive direction of the plane bounded by the X-axis and the Z-axis, the object setting area 601 is the range corresponding to the positive direction of the plane bounded by the X-axis and the Z-axis that passes through the first initial edit point.
[0108] Therefore, through the above implementation, the first initial editing point pointed by the cursor point can be accurately located in the three-dimensional virtual scene, and then combined with the locking range selected by the user, the object setting area actually required by the user can be accurately and efficiently determined in the three-dimensional virtual scene, thereby ensuring that the user can accurately set objects in the three-dimensional virtual scene, greatly improving the efficiency of the user in setting objects in the virtual scene.
[0109] FIG7 is a detailed flow chart of step 140 shown in FIG1. As shown in FIG7, in some possible implementations, step 140 may include the following steps:
[0110] In step 141 , a second initial editing point position where the cursor point is mapped in the virtual scene is determined according to the cursor point when the setting instruction is triggered.
[0111] Here, the setting instruction can be a user-triggered instruction for setting the first virtual object at a target edit point within the object setting area. The second initial edit point is the point in the object setting area to which the cursor point is mapped when the setting instruction is triggered. It should be noted that the cursor point is used to control the movement of the first virtual object.
[0112] It should be understood that, regarding how to determine the second initial editing point in the virtual scene, the relevant description of determining the first initial editing point in the above embodiment can be referred to, and will not be repeated here.
[0113] In step 142 , a second ray is determined in the virtual scene according to the virtual camera and the cursor point in the virtual scene.
[0114] Here, the concept of the second ray is consistent with that of the first ray, and reference may be made to the relevant description of the above embodiment, which will not be repeated here.
[0115] In step 143, the second coordinate corresponding to the second initial edit point is corrected according to the first coordinate corresponding to the intersection point between the second ray and the target plane corresponding to the object setting area to obtain the target edit point.
[0116] Here, for different object setting areas, the corresponding target planes may be different. For example, the target plane corresponding to the object setting area corresponding to the axis range is different from the target plane corresponding to the plane range.
[0117] In some embodiments, when the locked range is the axis range, a unit vector is constructed based on the first setting direction and the second initial editing point selected on the axis range, and the target plane corresponding to the axis range is determined based on the unit vector and the plane where the virtual camera is located in the virtual scene.
[0118] Detailed descriptions of the first set direction and the second initial edit point can be found in the description of the aforementioned embodiment. A unit vector is constructed with the second initial edit point as its origin and the first set direction as its direction. The virtual camera's plane is then moved onto the unit vector to obtain a plane P containing the unit vector. This plane is then referred to as the target plane.
[0119] It is worth noting that by determining the target plane by the plane where the virtual camera is located in the virtual scene, the target plane that meets the user's visual requirements can be located in the virtual scene when the locking range is the axial range.
[0120] In other embodiments, when the locked range is a plane range, the object setting area corresponding to the plane range is the target plane.
[0121] The intersection of the second ray and the target plane yields the first coordinates of the cursor point actually mapped onto the object setting area. Based on the first coordinates, the second coordinates corresponding to the second initial edit point are corrected to yield the target edit point actually mapped onto the object setting area.
[0122] It should be understood that modifying the second coordinates corresponding to the second initial edit point based on the first coordinates may be modifying the coordinate point corresponding to the object setting area on the second initial edit point to the value corresponding to the intersection. For example, assuming the lock range is the Y axis, the second coordinates of the second initial edit point are (3, 2, 255), and the first coordinates corresponding to the intersection are (2, 2, 255), then the target edit point is (2, 2, 255), so that the target edit point can be locked on the Y axis.
[0123] It should be understood that since the second initial edit point actually refers to the position in the virtual scene pointed to by the user's cursor, by correcting the second coordinate corresponding to the second initial edit point using the first coordinate corresponding to the intersection of the second ray and the target plane corresponding to the object setting area, the range of the user's object setting can be locked within the object setting area, thereby ensuring that the user can set objects within a specific range in the virtual space without setting virtual objects at the wrong location due to cursor jitter.
[0124] In step 144 , a first virtual object is set at the target editing point.
[0125] Here, the electronic device may physically draw a first virtual object at the target editing point, thereby setting the first virtual object at the target editing point.
[0126] Therefore, through the above steps 141 to 144, it is possible to efficiently and accurately locate any position in the virtual scene, thereby better assisting the user in building objects in the virtual scene, greatly improving the user's gaming experience.
[0127] Fig. 8 is a flow chart showing how to determine a locking range according to an exemplary embodiment. As shown in Fig. 8 , the locking range may be determined by the following steps.
[0128] In step 810 , at least one selected coordinate axis is determined, where the coordinate axes include a first coordinate axis, a second coordinate axis, and a third coordinate axis for constructing a virtual scene.
[0129] Here, the at least one coordinate axis selected by the user may be one or more coordinate axes among a first coordinate axis, a second coordinate axis, and a third coordinate axis in the virtual scene.
[0130] In some embodiments, at least one coordinate axis may be determined based on a pressing operation on at least one of a first button corresponding to the first coordinate axis, a second button corresponding to the second coordinate axis, and a third button corresponding to the third coordinate axis.
[0131] The first button is a shortcut key corresponding to the first coordinate axis, the second button is a shortcut key corresponding to the first coordinate axis, and the third button is a shortcut key corresponding to the first coordinate axis. It should be understood that the first button, the second button, and the third button can be physical buttons or virtual buttons.
[0132] When the electronic device detects a pressing operation on at least one of the first button, the second button, and the third button, the electronic device determines the coordinate axis corresponding to the button corresponding to the pressing operation as the coordinate axis selected by the user.
[0133] For example, the X key on the keyboard is the first key, the C key is the second key, and the Z key is the third key. When the user presses the X key, it means that the user selects the first coordinate axis as the lock range. When the user presses the X key and the C key, it means that the user selects the plane enclosed by the first coordinate axis and the second coordinate axis as the lock range. When the user presses the X key, the C key, and the Z key, it means that the user selects the third coordinate axis as the lock range.
[0134] It is worth mentioning that by pressing keys to determine the coordinate axis, the user can quickly select the coordinate axis to be locked.
[0135] In step 820 , a locking range is determined based on at least one coordinate axis.
[0136] Here, after the user selects at least one coordinate axis, the electronic device determines a locking range according to the at least one coordinate axis selected by the user.
[0137] In some embodiments, when the at least one coordinate axis includes any one of the first coordinate axis, the second coordinate axis, and the third coordinate axis, the locking range is determined according to any one of the coordinate axes.
[0138] When the user selects any one of the first coordinate axis, the second coordinate axis, and the third coordinate axis, the selected coordinate axis becomes the locked range.
[0139] For example, when the user presses the X key, it means that the user selects the first coordinate axis, and the first coordinate axis is used as the locked range.
[0140] In other embodiments, when the at least one coordinate axis includes any two of the first coordinate axis, the second coordinate axis, and the third coordinate axis, the locking range is determined according to a plane range enclosed by the any two coordinate axes.
[0141] When the user selects any two coordinate axes from the first coordinate axis, the second coordinate axis, and the third coordinate axis, the plane enclosed by the two coordinate axes selected by the user becomes the locked range.
[0142] For example, when the user presses the X key and the C key, it means that the user selects the plane enclosed by the first coordinate axis and the second coordinate axis as the locking range.
[0143] In some further embodiments, when the at least one coordinate axis includes a first coordinate axis, a second coordinate axis, and a third coordinate axis, the locking range is determined according to the coordinate axis that is last selected among the first coordinate axis, the second coordinate axis, and the third coordinate axis.
[0144] Among them, when the user selects the first coordinate axis, the second coordinate axis and the third coordinate axis, the one selected last by the user is the locked range.
[0145] For example, when the user presses the X key, the C key, and the Z key, if the last key pressed by the user is the Z key, it means that the user selects the third coordinate axis as the locked range.
[0146] It should be understood that if the user simultaneously presses two of the first, second, and third buttons, the plane bounded by the two coordinate axes corresponding to the two pressed buttons becomes the locked range. If the user presses the last button again, the locked range becomes the coordinate axis corresponding to the last button. If the user releases one of the three buttons after pressing it, the plane bounded by the coordinate axes corresponding to the remaining two buttons becomes the locked range. If the user releases a button again, the coordinate axis corresponding to the remaining button becomes the locked range.
[0147] It should be understood that by determining the locking range according to the last selected coordinate axis among the first coordinate axis, the second coordinate axis, and the third coordinate axis, the user can quickly switch between axis range locking and plane range locking.
[0148] Therefore, through the above embodiment, the user can quickly select the locking range.
[0149] FIG9 is a schematic diagram of a virtual object setting device according to some embodiments. As shown in FIG9 , an embodiment of the present disclosure provides a virtual object setting device 900, the virtual object setting device 900 comprising:
[0150] Display module 901, displays virtual scenes;
[0151] A determination module 902 is configured to determine an object setting area in the virtual scene according to a locking range selected in the virtual scene and a first initial editing point, wherein the locking range includes an axis range and a plane range;
[0152] A control module 903 is configured to control the first virtual object to move within the object setting area in response to a movement operation on the first virtual object in the virtual scene;
[0153] The setting module 904 is configured to set the first virtual object at a target editing point in the object setting area in response to a setting instruction.
[0154] Optionally, the virtual object setting device 900 further includes:
[0155] The cursor control module is configured to control the cursor point to be displayed on the first virtual object to be set when the locking range is switched.
[0156] Optionally, the cursor control module is specifically configured to:
[0157] The position of the first virtual object to be set is kept unchanged, and the cursor point is controlled to move to the center point of the first virtual object to be set.
[0158] Optionally, the virtual object setting device 900 further includes:
[0159] The area display module is configured to display the object setting area in the virtual scene.
[0160] Optionally, the virtual object setting device 900 further includes:
[0161] The object display module is configured to display the first virtual object in the virtual scene in response to a scene building operation.
[0162] Optionally, the determining module 902 includes:
[0163] The point determination unit is configured to determine the first initial editing point according to the cursor point displayed on the screen, wherein the first initial editing point is the position of the cursor point mapped in the virtual scene.
[0164] Optionally, the point determination unit is specifically configured to:
[0165] Determining a first ray in the virtual scene according to a virtual camera in the virtual scene and the cursor point;
[0166] The first initial editing point is determined according to an intersection point between the first ray and a second virtual object in the virtual scene.
[0167] Optionally, the determining module 902 includes a range determining unit, and the range determining unit is configured to:
[0168] In a case where the locking range is the axis range, determining the object setting area according to a first setting direction selected on the axis range and the first initial editing point;
[0169] In a case where the locked range is the plane range, the object setting area is determined according to a second setting direction selected on the plane range and the first initial editing point.
[0170] Optionally, the setting module 904 includes:
[0171] a first determining unit configured to determine, according to a cursor point when the setting instruction is triggered, a second initial editing point position mapped by the cursor point in the virtual scene, wherein the cursor point is used to control the movement of the first virtual object;
[0172] a second determining unit configured to determine a second ray in the virtual scene according to the virtual camera and the cursor point in the virtual scene;
[0173] an obtaining unit configured to correct the second coordinate corresponding to the second initial edit point according to the first coordinate corresponding to the intersection point between the second ray and the target plane corresponding to the object setting area, to obtain the target edit point;
[0174] The setting unit is configured to set the first virtual object at the target editing point.
[0175] Optionally, the obtaining unit is specifically configured to:
[0176] When the locking range is the axis range, constructing a unit vector according to the first setting direction selected on the axis range and the second initial editing point;
[0177] The target plane corresponding to the axis range is determined according to the unit vector and the plane where the virtual camera in the virtual scene is located.
[0178] Optionally, the determining module 902 includes:
[0179] a third determining unit configured to determine at least one selected coordinate axis, wherein the coordinate axis includes a first coordinate axis, a second coordinate axis, and a third coordinate axis for constructing the virtual scene;
[0180] The fourth determining unit is configured to determine the locking range according to the at least one coordinate axis.
[0181] Optionally, the fourth determining unit is specifically configured to:
[0182] In a case where the at least one coordinate axis includes any one of the first coordinate axis, the second coordinate axis, and the third coordinate axis, determining the locking range according to the any one coordinate axis;
[0183] In a case where the at least one coordinate axis includes any two of the first coordinate axis, the second coordinate axis, and the third coordinate axis, the locking range is determined according to a plane range enclosed by the any two coordinate axes;
[0184] In a case where the at least one coordinate axis includes the first coordinate axis, the second coordinate axis, and the third coordinate axis, the locking range is determined according to the coordinate axis that is last selected among the first coordinate axis, the second coordinate axis, and the third coordinate axis.
[0185] Optionally, the third determining unit is specifically configured to:
[0186] The at least one coordinate axis is determined according to a pressing operation on at least one of a first button corresponding to the first coordinate axis, a second button corresponding to the second coordinate axis, and a third button corresponding to the third coordinate axis.
[0187] The logic of the method executed by each functional module in the above-mentioned virtual object setting device 900 can refer to the part of the method related to the above-mentioned embodiment, and will not be repeated here.
[0188] Reference is now made to FIG10 , which illustrates a schematic diagram of the structure of an electronic device (e.g., a terminal device) 1000 suitable for implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device illustrated in FIG10 is merely an example and should not limit the functionality or scope of use of the embodiments of the present disclosure.
[0189] As shown in FIG10 , the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. Various programs and data required for the operation of the electronic device 1000 are also stored in the RAM 1003. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0190] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 10 illustrates the electronic device 1000 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.
[0191] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0192] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0193] In some embodiments, the electronic devices can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0194] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0195] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: displays a virtual scene; determines an object setting area in the virtual scene based on a locking range and a first initial editing point selected in the virtual scene, wherein the locking range includes an axis range and a plane range; controls the movement of the first virtual object in the object setting area in response to a moving operation on a first virtual object in the virtual scene; and sets the first virtual object at a target editing point in the object setting area in response to a setting instruction.
[0196] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0197] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0198] The modules described in the embodiments of the present disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the module itself.
[0199] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0200] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0201] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the present disclosure is not limited to technical solutions formed by a specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents, without departing from the above-mentioned disclosure. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0202] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0203] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.
Claims
1. A method for setting a virtual object, comprising: Display virtual scenes; Determining an object setting area in the virtual scene according to a locking range and a first initial editing point selected in the virtual scene, wherein the locking range includes an axis range and a plane range; In response to a movement operation on a first virtual object in the virtual scene, controlling the first virtual object to move within the object setting area; as well as In response to a setting instruction, the first virtual object is set at a target edit point in the object setting area.
2. The method for setting a virtual object according to claim 1, wherein: The first initial editing point is determined by a cursor point displayed on a screen, and the method for setting the virtual object further includes: In the case of switching the lock range, the cursor point is controlled to be displayed on the first virtual object to be set.
3. The method for setting a virtual object according to claim 2, wherein: The controlling the cursor point to be displayed on the first virtual object to be set includes: The position of the first virtual object to be set is kept unchanged, and the cursor point is controlled to move to the center point of the first virtual object to be set.
4. The method for setting a virtual object according to any one of claims 1 to 3, further comprising: The object setting area is displayed in the virtual scene.
5. The method for setting a virtual object according to any one of claims 1 to 4, further comprising: In response to a scene building operation, the first virtual object is displayed in the virtual scene.
6. The method for setting a virtual object according to any one of claims 1 to 5, wherein: The first initial edit point is determined by the following steps: The first initial editing point is determined according to the cursor point displayed on the screen, wherein the first initial editing point is the position where the cursor point is mapped in the virtual scene.
7. The method for setting a virtual object according to claim 6, wherein: The step of determining the first initial editing point according to the cursor point displayed on the screen includes: According to the virtual camera in the virtual scene and the cursor point, the virtual scene is determined Determine the first ray; and The first initial editing point is determined according to an intersection point between the first ray and a second virtual object in the virtual scene.
8. The method for setting a virtual object according to any one of claims 1 to 7, wherein: The determining of the object setting area in the virtual scene according to the locking range and the first initial editing point selected in the virtual scene includes: In a case where the locking range is the axis range, determining the object setting area according to a first setting direction selected on the axis range and the first initial editing point; and In a case where the locked range is the plane range, the object setting area is determined according to a second setting direction selected on the plane range and the first initial editing point.
9. The method for setting a virtual object according to any one of claims 1 to 8, wherein: Setting the first virtual object at the target editing point in the object setting area includes: determining, according to a cursor point when the setting instruction is triggered, a second initial editing point position mapped by the cursor point in the virtual scene, wherein the cursor point is used to control the movement of the first virtual object; determining a second ray in the virtual scene according to a virtual camera in the virtual scene and the cursor point; Correcting the second coordinate corresponding to the second initial edit point according to the first coordinate corresponding to the intersection of the second ray and the target plane corresponding to the object setting area to obtain the target edit point; and The first virtual object is set at the target editing point.
10. The method for setting a virtual object according to claim 9, wherein: The target plane corresponding to the object setting area is determined by the following steps: When the locking range is the axis range, constructing a unit vector according to the first setting direction selected on the axis range and the second initial editing point; as well as The target plane corresponding to the axis range is determined according to the unit vector and the plane where the virtual camera in the virtual scene is located.
11. The method for setting a virtual object according to any one of claims 1 to 10, wherein: The locking range is determined by the following steps: Determine at least one selected coordinate axis, wherein the coordinate axis includes a coordinate axis for constructing the virtual field a first coordinate axis, a second coordinate axis, and a third coordinate axis of the scene; and The locking range is determined according to the at least one coordinate axis.
12. The method for setting a virtual object according to claim 11, wherein: The determining the locking range according to the at least one coordinate axis includes: In a case where the at least one coordinate axis includes any one of the first coordinate axis, the second coordinate axis, and the third coordinate axis, determining the locking range according to the any one coordinate axis; In a case where the at least one coordinate axis includes any two of the first coordinate axis, the second coordinate axis, and the third coordinate axis, determining the locking range according to a plane range enclosed by the any two coordinate axes; and In a case where the at least one coordinate axis includes the first coordinate axis, the second coordinate axis, and the third coordinate axis, the locking range is determined according to the coordinate axis that is last selected among the first coordinate axis, the second coordinate axis, and the third coordinate axis.
13. The method for setting a virtual object according to claim 11 or 12, wherein: The determining of the at least one selected coordinate axis includes: The at least one coordinate axis is determined according to a pressing operation on at least one of a first button corresponding to the first coordinate axis, a second button corresponding to the second coordinate axis, and a third button corresponding to the third coordinate axis.
14. A device for setting a virtual object, comprising: Display module, displaying virtual scenes; a determination module configured to determine an object setting area in the virtual scene according to a locking range selected in the virtual scene and a first initial editing point, wherein the locking range includes an axis range and a plane range; A control module configured to control a first virtual object in the virtual scene to move within the object setting area in response to a movement operation on the first virtual object; as well as The setting module is configured to set the first virtual object at a target editing point in the object setting area in response to a setting instruction.
15. A computer-readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processing device, the method for setting a virtual object according to any one of claims 1 to 13 is implemented.
16. An electronic device comprising: a storage device having a computer program stored thereon; A processing device is configured to execute the computer program in the storage device to implement the virtual object setting method according to any one of claims 1 to 13.
17. A computer program product comprising a computer program, wherein When the computer program is executed by a processor, the method for setting a virtual object according to any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Virtual object moving method and device, computing equipment and storage medium
CN113608643A
Data processing method, home decoration design method, equipment and storage medium
CN114756919A
Virtual object setting method and device, medium, electronic equipment and program product
CN118038003A
Coordinate axis display method and apparatus applied to virtual environments, terminal, and medium
US20230321535A1
Manipulating graphic objects in 3D scenes
US6426745B1