Method and apparatus for synchronously fusing virtual character and virtual space on virtual engine

By obtaining positioning and controller information from the virtual engine, creating a Character class and simulating displacement, the real-time synchronization problem between virtual characters and virtual space is solved, enabling smooth interaction and efficient synchronization between users and virtual space, thus improving the interactive experience of naked-eye fully immersive mixed reality products.

CN115131530BActive Publication Date: 2026-04-10HANGZHOU YIYUQIANXIANG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU YIYUQIANXIANG TECH CO LTD
Filing Date
2022-07-05
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing naked-eye fully immersive mixed reality products cannot achieve real-time synchronous fusion of virtual characters and virtual spaces, resulting in insufficient interaction between users and virtual spaces, a lack of flexibility of the Character class, and an inability to perform smooth actions such as climbing stairs and jumping.

Method used

In the virtual engine, location information and controller control information are obtained, a Character class is created, and a room component is created within it. The movement component is used to simulate displacement and force synchronization of the target position to achieve real-time fusion of the virtual character and the virtual space.

Benefits of technology

It achieves real-time synchronization and fusion of virtual characters and virtual spaces, improves the continuity and realism of user interaction with virtual spaces, reduces scene jitter and interaction latency, enhances functional scalability, and reduces the learning cost for developers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115131530B_ABST
    Figure CN115131530B_ABST
Patent Text Reader

Abstract

The application provides a method and device for synchronously fusing a virtual character and a virtual space on a virtual engine, introduces a Character class in the virtual engine, simultaneously controls the Character class by using positioning information and controller control information, constantly corrects displacement results of simulated displacement by using the positioning information, obtains a target position reflecting a real situation, and realizes real-time fusion of the virtual character and the virtual space. The operation of moving the virtual character by moving the controller or moving the user can be simultaneously performed, so that the expandability of the function is improved, and the scheme completely follows the endogenous logic in the virtual engine, so that the additional learning cost of a developer is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of virtual engine, in particular to a method and device for synchronously fusing a virtual character and a virtual space in a virtual engine. BACKGROUND

[0002] A naked-eye full-immersion mixed reality product refers to a product in which a user experiences a full-immersion virtual picture in a real physical space without wearing any auxiliary equipment. In order to achieve the above effect, a projection device is often configured to present a full-immersion virtual space with real size and real proportion in the real physical space. However, the user demand has not only met the virtual picture content of the virtual space displayed in a plane, but also hopes to realize real-time picture interaction in the virtual space, which requires the implementation of a powerful virtual engine.

[0003] A virtual engine is essentially a general development platform based on a bottom programming language, which includes various interactive hardware interfaces, a management and drawing module of graphic data, a functional design module, a message response mechanism, a network interface and the like, and can support various controller input to drive a player character. However, the information of the controller input is used to control the virtual space, and cannot be linked with the real positioning information of the user, resulting in that the current virtual space does not have the feature of interacting with the player and lacks the flexibility of the Character class. Specifically, the current naked-eye full-immersion mixed reality product cannot meet the effect of smoothly interacting with the virtual picture content of the virtual space, such as the operation of going upstairs and jumping, that is, the virtual character and the virtual space cannot realize real-time synchronous fusion. SUMMARY

[0004] The present application aims to provide a method and device for synchronously fusing a virtual character and a virtual space in a virtual engine, so that different sources of control information control the Character class at the same time, and the control of the virtual picture content by different control information can be performed individually, so as to realize the effectiveness of the user interacting with the virtual picture content without affecting the picture content of the virtual picture content.

[0005] In order to achieve the above purpose, the present technical solution provides a method for synchronously fusing a virtual character and a virtual space in a virtual engine, comprising:

[0006] acquiring driving information from different driving sources in the virtual engine, wherein the driving information includes at least one of positioning information and controller control information, and the driving information is expressed in driving speed and driving direction;

[0007] create a Character class and create a room Component component in the Character class, wherein the room Component component obtains real space position information of a user in a real physical space based on the positioning information, and calculates role position change information and role change initial speed of a virtual role based on change of the real space position information of the current tick event, wherein the virtual role is the user in a coordinate system of a virtual space;

[0008] The Movement Component component of the Character class obtains the role position change information, the role change initial speed, all the controller control information and self-displacement information of the current tick event, and simulates displacement of the current tick event to obtain a target position;

[0009] The target position is forcibly synchronized to the client.

[0010] In the second aspect, the present application provides a virtual role and virtual space synchronization fusion device on a virtual engine, comprising:

[0011] A driving information acquisition unit is configured to acquire driving information from different driving sources in the virtual engine, wherein the driving information comprises at least one of positioning information and controller control information, and the driving information is expressed in driving speed and driving direction;

[0012] A positioning information data unit is configured to create a Character class and create a room Component component in the Character class, wherein the room Component component obtains real space position information of a user in a real physical space based on the positioning information, and calculates role position change information and role change initial speed of a virtual role based on change of the real space position information of the current tick event, wherein the virtual role is the user in a coordinate system of a virtual space;

[0013] A simulation displacement unit is configured to obtain the role position change information, the role change initial speed, all the controller control information and self-displacement information of the current tick event in the Movement Component component of the Character class, and simulate displacement of the current tick event to obtain a target position;

[0014] A synchronization unit is configured to forcibly synchronize the target position to the client.

[0015] Compared with the prior art, the technical scheme has the following beneficial effects:

[0016] The scheme introduces a Character class in the virtual engine, controls the Character class by using the positioning information and the controller control information, constantly corrects the displacement result of the simulation displacement by using the positioning information, obtains the target position reflecting the real situation, and realizes the real-time fusion of the virtual character and the virtual space. The operation of moving the virtual character by moving the controller or the user himself can be performed at the same time, so that the expandability of the function is improved, and the scheme completely follows the endogenous logic in the virtual engine, reduces the additional learning cost of the developer. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 is a flowchart of a virtual character and virtual space synchronous fusion method on a virtual engine according to an embodiment of the application;

[0018] Figure 2 is a schematic diagram of a virtual space according to an embodiment of the application;

[0019] Figure 3 is a structural block diagram of a virtual character and virtual space synchronous fusion device on a virtual engine according to an embodiment of the application;

[0020] Figure 4 is a hardware structure schematic diagram of an electronic device according to an embodiment of the application DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art belong to the scope of protection of the application.

[0022] Those skilled in the art should understand that in the disclosure of the application, the terms "longitudinal", "transverse", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, which are only for the convenience of describing the application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, therefore the above terms cannot be understood as a limitation of the application.

[0023] It can be understood that the term "one" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of one element can be one, and in another embodiment, the number of the element can be multiple, and the term "one" cannot be understood as a limitation on the number.

[0024] Embodiment one

[0025] The present scheme provides a method and device for synchronously integrating a virtual character and a virtual space on a virtual engine, which synchronously integrates a virtual character corresponding to a player and a virtual space on a virtual engine to realize the interaction between a user and a virtual space, controls a Character class based on controller control information and positioning information, and does not affect the control logic of a single controller.

[0026] Specifically, as shown in Figure 1 The method for synchronously integrating a virtual character and a virtual space on a virtual engine provided by the present scheme includes the following steps:

[0027] Virtual engine is used to obtain driving information from different driving sources, wherein the driving information includes at least one of positioning information and controller control information, and the driving information is expressed in driving speed and driving direction;

[0028] A Character class is created, and a room Component component is created in the Character class, wherein the roomComponent component obtains real space position information of a user in a real physical space based on the positioning information, calculates character position change information and character change initial speed based on the change of the real space position information of the current tick event, and the virtual character is a user in a coordinate system of a virtual space;

[0029] The Movement Component component of the Character class obtains the character position change information, the character change initial speed, all the controller control information and self-displacement information of the current tick event, and simulates displacement of the current tick event to obtain a target position;

[0030] The target position is forcibly synchronized to a client.

[0031] The schematic diagram of the virtual space provided by the present scheme is shown in Figure 2 At least one projection device is placed in a real physical space, a virtual picture content is projected to the real physical space by the projection device to form a virtual space, and a user is in the real physical space to experience the naked-eye reality brought by the virtual space. The positioning information of the present scheme is used to obtain real space position information of a user in a real physical space, and the controller control information is used to obtain control information for controlling virtual picture content in a virtual space.

[0032] As shown above, the driving information can be distinguished into controller control information and positioning information according to the driving source, wherein the controller control information is control information from the control device, such as control information from the controller handle, the controller virtual joystick and the controller keyboard and mouse. The controller control information is used to control the virtual picture content of the virtual space, such as moving the handle to adjust the movement of the virtual picture content. Generally, the controller control information describes the displacement by describing the speed and direction.

[0033] The positioning information is real space position information of the user relative to the physical space captured by the positioning system, and the positioning system is a system composed of a set of independent sensors and processors for capturing the space position coordinates of the user. The positioning information is used to reflect the real space position information of the user relative to the real physical space, and the virtual space is built on the real physical space. Generally, the positioning information describes the displacement by describing the position information.

[0034] In order to comply with the original control logic of the virtual engine, it is necessary to homogenize the driving information into driving speed and driving direction. As known from the above, the controller control information has already described the displacement by driving speed and driving direction, so the scheme focuses on homogenizing the positioning information to describe the displacement by driving speed and driving direction. In this way, the driving and interaction logic of the virtual engine can be maximally utilized.

[0035] The Room Component component of the scheme is made based on the Component class of the virtual engine, which is inserted under the Character Actor. The Room Component component is used to describe the relative position of the virtual space of the real physical space in the virtual space. The room Component component created by the scheme actively tracks the virtual space position of the virtual character, and is driven by the positioning information to ensure that the relative position of the virtual space and the user is always accurate.

[0036] The Movement Component is a Component class preset in the Character class of the virtual engine, which is specially responsible for processing the movement of the character. It describes the position change of the character by using "speed", and supports "acceleration", "force" and other inputs that can be used to calculate "speed". The logic of the Movement Component for processing the "speed" input is as follows: according to the sum of all speed / force inputs from the last tick to this tick, the total displacement generated in this small period of time is calculated, and the server-client synchronization smoothing simulation is performed to realize this small displacement.

[0037] That is, for the Movement Component, the "end point" of displacement is flexible and variable, and the "speed" is the constant criterion, but in actual use requirements, the "end point" must be fixed because the person has already walked to that place in the actual real physical space, and the "speed" is flexible and variable. Therefore, the present solution adaptively changes the Movement Component so that it can work with the Room Component.

[0038] It is worth mentioning that in order to ensure the effect of synchronous fusion rendering, the Movement Component has an additional verification mechanism on the existing workflow to ensure that 1) unless the server side determines that the end point of this movement is an illegal position, the end point of each simulation falls on the input position of the positioning information; 2) during the simulation process, the RoomComponent synchronously adjusts the position change of the virtual space to ensure that the position change of the virtual twin of the real physical space in the virtual world is smooth and stable.

[0039] Specifically, in the step of "calculating the role position change information and the role change initial speed based on the change of the real space position information",

[0040] At the beginning of the current tick event, the real space position change amount is calculated based on the latest real space position information and the real space position information of the last tick event;

[0041] Based on the rotation information of the real physical space relative to the virtual space, the role position change information is converted from the real space position change amount, wherein the role position change information is in the coordinate system in which the virtual space is located;

[0042] The time consumption of the current tick event is obtained, and the ratio of the role position change information and the time consumption is calculated to obtain the role change initial speed.

[0043] When calculating the time consumption of the current tick event, the interval of the previous tick events is obtained to calculate the interval of the current tick event. Because the time consumption of each tick is not a fixed value, but is related to the time consumption of the rendering thread. The rendering thread responsible for rendering the game screen of Unreal Engine and the Gameplay thread responsible for simulating the events occurring at each moment in the game world have a relatively loose association. The screen output by the rendering thread at most lags behind the Gameplay thread by 1-2 frames. When the time consumption of rendering a single frame is high, the Gameplay thread will also slow down and wait. Therefore, the time consumption of a single tick is affected by both the amount of calculation of simulated events and the amount of calculation of rendering. Particle effects, post effects, and other special effects in the scene can cause sudden increases / decreases in rendering time consumption, bringing more uncertainty to the time consumption on the Gameplay side. Therefore, the present scheme obtains a more reasonable time consumption estimate value from the previous tick events.

[0044] The MovementComponent component obtains all input controller control information of the current tick event, which is obtained in the form of speed, force, and acceleration to obtain a displacement speed for simulating displacement, which is synchronized to the server side.

[0045] It should be noted that the running conditions of the server side where the virtual engine is located and the client side where the virtual space is located are different, and the simulation basis is different, resulting in different final positions of the simulated displacement on the server side and the client side. Generally, the final endpoint of the server side is authoritative.

[0046] The reason why the present scheme needs to simulate displacement on the server side and the client side at the same time is that it cannot be guaranteed that synchronous actions will occur every tick event, and it cannot be guaranteed that the synchronization of this tick event will occur at a future time. The engine network communication module will perform operations such as combination and packaging optimization on communication data when the communication quality is not good, resulting in a delay or discard of the synchronization event (if the delay time is too long). In order to ensure that the client still has a smooth process experience in this case, the UE engine adopts the strategy of simulating on both sides at the same time and correcting the final result. This also helps to reduce the data volume of network communication and reduce the operation response delay of the client.

[0047] In addition, it should be noted that the simulation of displacement involves many different levels of simulation, in addition to the driving information, there are also displacement changes caused by game mechanisms and environmental interactions (for example, "falling off a cliff during the forward process", which is affected by the simulation of gravity acceleration; "being blown away by a bomb during the forward process", which is affected by the simulation of the force applied by the "bomb" Actor and gravity acceleration), and the simulation of displacement will perform superposition processing on all information.

[0048] In the step of "the Movement Component component of the Character class obtains the character position change information, the character change initial speed, all the controller control information and the self-displacement information of the current tick event as simulation information, and simulates the displacement of the current tick event to obtain the target position", the self-displacement information is from the displacement change caused by the content mechanism and environmental interaction.

[0049] It is worth mentioning that the current tick event will be rendered multiple times. That is, the current tick event can be subdivided into small fixed time intervals, and the segmented simulation is performed in each fixed time interval, which can ensure the simulation of real visual sense. For example, suppose a thin collision body is placed in space, and if an object passes through the collision body at a very fast speed, multi-segment rendering simulation can maximize the "collision" event of the collision body to be triggered correctly, without causing the object to be on the left side of the collision body in the previous tick and directly run to the right side of the collision body in the next tick without collision.

[0050] And the scheme constantly corrects the input speed of the Room Component into the MovementComponent according to the calculation result between the character position change information and the character change initial speed and the simulation displacement output by the Room Component in the multi-segment simulation.

[0051] Correspondingly, in the step of "the Movement Component component of the Character class obtains the character position change information, the character change initial speed, all the controller control information and the self-displacement information of the current tick event as simulation information, and simulates the displacement of the current tick event to obtain the target position", the current tick event is simulated in multiple segments, the effective displacement amount is obtained by using the position change vector obtained by the previous segment simulation to offset the character position change information, the character change speed is obtained by correcting the character change initial speed based on the remaining displacement amount of the current tick event and the remaining time consumption of the current tick event, the effective displacement amount is substituted for the character position change information, and the character change speed is substituted for the character change initial speed. The operation is repeated in the next segment simulation to obtain the target position.

[0052] The scheme combines the character position change information, the character change initial speed, all the controller control information and the self-displacement information to simulate in each segment simulation to obtain the position change vector corresponding to the current segment simulation. Although the number of segment simulations of different tick events is different, the calculation process of each segment simulation is the same:

[0053] The same direction vector is found from the position change vector generated by the current segment simulation, and the effective displacement is obtained by subtracting the same direction vector from the character position change information, which is used as the input information for the next segment simulation.

[0054] Specifically, in the step of "obtaining the effective displacement by subtracting the offset displacement from the character position change information", the offset displacement in the same direction as the character position change information is separated from the position change vector, and the effective displacement is obtained by subtracting the offset displacement from the character position change information. For example:

[0055] The position change vector Ln obtained by each segment simulation is compared with the character position change information ΔPi:

[0056] The vector l in the same direction as ΔPi is separated from Ln and regarded as the offset displacement of the Room Component, and the rest is regarded as the effective displacement of the Room Component: ΔPi minus l, which is used in the next operation: ΔPi+1=ΔPi–l.

[0057] In the step of "correcting the initial speed of the character change based on the remaining displacement of the current tick event and the remaining time consumption of the current tick event to obtain the speed of the character change", the quotient of the remaining displacement of the current tick event and the remaining time consumption of the current tick event is calculated to obtain the speed of the character change.

[0058] The specific calculation method is as follows:

[0059] The calculation formula of the displacement obtained by each segment simulation is as follows:

[0060] ln=vn*tn,

[0061] Where vn corresponds to the speed of segment simulation, and tn corresponds to the time consumption of segment simulation.

[0062] The total displacement of the current tick event in the scheme is the sum of the displacement corresponding to the driving information. Specifically, the calculation formula of the total displacement L of the current tick event is as follows:

[0063] The total displacement L of the current tick event is the movement corresponding to the positioning information plus the movement corresponding to the controller control information.

[0064] The remaining displacement of the current tick event is calculated based on the total displacement L of the current tick event and the displacement obtained by each segment simulation, and the calculation formula is as follows:

[0065] The remaining displacement of the current tick event is Ln=L–(l1+l2+l3+…+ln-1).

[0066] wherein L is the total displacement amount of the current tick event, ln-1 is the displacement amount of each segment simulation before the current tick event.

[0067] Finally, the character change speed of each segment simulation is calculated based on the remaining displacement amount of the current tick event and the remaining time Tremain of the current tick event, and the specific calculation formula is as follows:

[0068] Then the character change speed of each segment simulation = the remaining displacement amount Ln of the current tick event / the remaining time Tremain of the current tick event.

[0069] In addition, when the character position change information after multiple segment simulations is offset to 0, it means that the offset of the character position change information is completed, and all the additional displacements generated in the remaining segment simulation will be executed as the effective displacement amount of the character position change information. The additional displacement here refers to the subsequent movement when the offset between the user position and the space position is completed.

[0070] For example, in one simulation, the user walks 0.5 meters forward, and at the same time, the virtual picture content is moved in the same direction by pushing the joystick. Then the room component will record the forward movement amount that needs to be offset as 0.5 meters by the above calculation method. As long as the offset movement amount reaches the expected value (0.5 meters), the subsequent movement of the room will be moved together with the character.

[0071] If the character position change information after the current tick event is not offset to 0, it means that the simulation of this tick has not reached the desired position, and the remaining character position change information after the current tick event is retained and labeled with the tick sequence number.

[0072] In the step of "forcibly synchronizing the target position to the client", the present scheme modifies the function of forced synchronization, so that the server side adds the remaining character position change information when forcibly synchronizing the target position to the client. Correspondingly, in the step of "forcibly synchronizing the target position to the client", when the character position change information after the current tick event is not offset to 0, the remaining character position change information at this time is obtained, and the remaining character position change information is added to the target position and synchronized to the client.

[0073] That is, the residual role position change information corresponding to the tick sequence label is obtained, the residual role position change information is added to the target position to obtain a client target position, the information authority level of the client is improved, and the client target position is synchronized to the server end again, and then the information authority level of the client is restored. The purpose of doing so is to reduce the teleport back effect caused by server forced synchronization when the role moves at high speed, so as to maintain the game experience of the player.

[0074] Through the above technical means, the present scheme realizes complete synchronization of virtual roles and virtual spaces, so as to enhance the continuity and authenticity of user interaction with virtual picture content in virtual space, and reduce negative effects such as scene jitter and interaction delay.

[0075] In addition, in order to improve the interaction experience of a multi-user networking scene, the synchronization and fusion method of virtual roles and virtual spaces on a virtual engine provided by the present scheme further realizes that a player faces can be accurately observed, and the player's observation of the world is not affected by the facing.

[0076] For example, in a multi-user networking scene, user A and user B play in their respective space positions and share the same virtual picture content, and can see each other's virtual roles in the virtual picture content. For example, user B is fighting monsters, and the "forward" direction that user B needs to move is determined by the rotation of user B relative to the virtual space where user B is located, and the virtual role of user B seen by user A faces the monster, and such an effect needs to be achieved through facing separation technology.

[0077] Unlike the previous wearable virtual reality scene, the present scheme realizes the display of virtual picture content in a naked-eye full-immersion mixed reality product, which means that the user obtains different observation angles by turning himself / herself, and needs to control the display effect of the virtual picture content based on the observation angle of the user. In order to realize facing separation in the naked-eye full-immersion mixed reality product provided by the present scheme, the synchronization and fusion method of virtual roles and virtual spaces on a virtual engine provided by the present scheme further includes the following steps:

[0078] Obtain rotation data, wherein the rotation data includes room orientation rotation data, controller orientation rotation data, and performance orientation rotation data;

[0079] Store the rotation data and the corresponding binding relationship in PlayerState;

[0080] Change any of the rotation data to obtain changed rotation data and trigger a rotation event;

[0081] The component receives the rotation event, obtains the calculation method from the binding relationship in the PlayerState, and calls the modified rotation data and other rotation data to calculate the rotation angle and execute.

[0082] The rotation data of the present scheme is divided into room orientation rotation data, controller orientation rotation data and performance orientation rotation data according to different objects, wherein the room orientation rotation data focuses on the rotation angle of the real physical space where the virtual space is located relative to the virtual space, which usually does not change in real time in the game, but is adjusted through a configuration file, and in some special scenarios, the rotation angle is bound to an actor. The controller orientation rotation data focuses on the rotation angle of the user himself relative to the virtual space, which can be bound to an actor or a character model. Since the room component belongs to the actor, when the angle is bound to the actor layer, the room component will perform corresponding reverse rotation + displacement when the angle changes to ensure that the relative angle and position of the room and the virtual world do not change during rotation. The performance orientation rotation data focuses on the rotation angle of the virtual character in the virtual world, which usually needs to cooperate with the game performance, so there is often a discrepancy between the player's orientation, and this rotation angle is usually bound to the character model layer.

[0083] If the rotation of the controller orientation rotation data is also bound to the character model layer, the following processing is performed: when there is no performance requirement, the rotation angle of the character model is synchronized to ensure that the model state of the control end and the observer end is consistent; when there is a performance requirement, the synchronization is disconnected, and the virtual character of the observer end controls the rotation angle to meet the narrative needs. At the same time, the state machine responsible for driving the action of the character (belonging to the character model) needs to calculate the animation state corresponding to the action event through the model angle difference between the control end and the observer end.

[0084] In the step of "storing the rotation data and the corresponding binding relationship in the PlayerState", the binding relationship of the rotation data exists in the PlayerState in the form of an enumeration class.

[0085] In addition, in order to match the three types of rotation data, the present scheme provides three active interfaces respectively consistent with the types of rotation data to modify the room orientation rotation data, the controller orientation rotation data and the performance orientation rotation data respectively, and when any of the rotation data is modified, a rotation event will be triggered, which is received by related components, which can be a Character Actor, a Character Mesh or a Room Component.

[0086] The component receiving the rotation event finds a corresponding method for calculating rotation according to the binding relationship of the current PlayerState, and then calls the rotation data in the PlayerState to calculate the rotation angle as needed, so as to realize the facing separation of multiple virtual characters in the virtual space.

[0087] Embodiment Two

[0088] Based on the same concept, referring to Figure 3 The application also provides a virtual character and virtual space synchronization fusion device on a virtual engine, which comprises:

[0089] A driving information acquisition unit is configured to acquire driving information from different driving sources in the virtual engine, wherein the driving information comprises at least one of positioning information and controller control information, and the driving information is expressed in driving speed and driving direction.

[0090] A positioning information data unit is configured to create a Character class and create a roomComponent component in the Character class, wherein the roomComponent component is configured to acquire real space position information of a user in a real physical space based on the positioning information, and calculate character position change information and character change initial speed based on the change of the real space position information of the current tick event, wherein the virtual character is a user in a coordinate system of a virtual space.

[0091] A simulation displacement unit is configured to acquire the character position change information, the character change initial speed, all the controller control information and self-displacement information of the current tick event in the Movement Component component of the Character class, and perform simulation displacement on the current tick event to obtain a target position.

[0092] A synchronization unit is configured to forcibly synchronize the target position to a client.

[0093] The same technical content as in Embodiment One in Embodiment Two will not be repeated.

[0094] Embodiment Three

[0095] The embodiment also provides an electronic device, referring to Figure 4 comprising a memory 404 and a processor 402, the memory 404 storing a computer program, and the processor 402 being configured to run the computer program to execute the steps in any one of the virtual character and virtual space synchronization fusion method embodiments on a virtual engine.

[0096] In particular, the processor 402 described above can include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or can be configured to implement one or more integrated circuits that embody the embodiments of the present application.

[0097] The memory 404 can include mass storage for data or instructions. By way of example, and not limitation, the memory 404 can include a Hard Disk Drive (HDD), a floppy disk drive, a solid state drive (SSD), flash memory, a USB drive, a Zip Drive, or a combination of two or more of these. The memory 404 can be removable or non-removable (or fixed) as appropriate. The memory 404 can be internal or external as appropriate. In particular embodiments, the memory 404 is a non-volatile memory. In particular embodiments, the memory 404 includes a Read-Only Memory (ROM) and a Random Access Memory (RAM). The ROM can be a mask-programmed ROM, a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), an Electrically Alterable ROM (EAROM), or a FLASH, or a combination of two or more of these, as appropriate. The RAM can be a Static Random-Access Memory (SRAM) or a Dynamic Random-Access Memory (DRAM), which can be a Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), an Extended Data Out Dynamic Random-Access Memory (EDODRAM), a Synchronous Dynamic Random-Access Memory (SDRAM), or the like, as appropriate.

[0098] The memory 404 can be used to store or buffer various data files needed for processing and / or communication, and possible computer program instructions executed by the processor 402.

[0099] The processor 402 can implement the synchronization fusion method of the virtual character and the virtual space in any of the above embodiments by reading and executing the computer program instructions stored in the memory 404.

[0100] Optionally, the electronic device can further include a transmission device 406 connected to the processor 402 and an input / output device 408 connected to the processor 402.

[0101] The transmission device 406 can be used to receive or send data via a network. The network can include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 406 can be a radio frequency (RF) module for communicating with the Internet through wireless means.

[0102] The input / output device 408 is used to input or output information. In the present embodiment, the input information can be driving information from various sources, such as positioning information and controller control information, and the output information can be target positions, etc.

[0103] Optionally, in the present embodiment, the processor 402 can be configured to perform the following steps by computer program:

[0104] Obtaining driving information from different driving sources in the virtual engine, wherein the driving information includes at least one of positioning information and controller control information, and the driving information is represented by driving speed and driving direction;

[0105] Creating a Character class and creating a room Component component in the Character class, wherein the roomComponent component obtains real space position information of a user in a real physical space based on the positioning information, and calculates character position change information and character change initial speed based on changes in the real space position information of the current tick event, wherein the virtual character is a user in a coordinate system of a virtual space;

[0106] The Movement Component component of the Character class obtains the character position change information of the current tick event, the character change initial speed, all the controller control information and the self displacement information, and performs simulation displacement on the current tick event to obtain a target position;

[0107] The target position is forced to be synchronized to the client.

[0108] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation manners, and this embodiment will not be described here.

[0109] In general, various embodiments can be implemented in hardware or special-purpose circuits, software, logic, or any combination thereof. Some aspects of the application can be implemented in hardware, while other aspects can be implemented in firmware or software which can be executed by a controller, microprocessor or other computing device, but the application is not limited thereto. While various aspects of the application can be illustrated and described as block diagrams, flow charts, or using some other pictorial representation, it is well understood that these blocks, apparatus, systems, techniques or methods described herein can be implemented in hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controlers or other computing devices, or some combination thereof.

[0110] Embodiments of the application can be implemented by computer software executable by a data processor of the mobile device such as in the processor entity, or by hardware, or by a combination of software and hardware. Computer software or program, also called program product, including software routines, applets and / or macros, can be stored in any apparatus-readable data storage medium and they include program instructions to implement specific tasks. The program product can include one or more computer-executable components which can be implemented by the data processor. The one or more computer-executable components can be one or more software codes or portions thereof. Further, in this context, it should be noted that any blocks of the logic flow as well as any message interactions can represent program steps, or interconnected logic circuits, blocks and functions, or a combination of program steps and logic circuits, blocks and functions. The software can be stored on such physical media as memory chips, or memory blocks implemented in the processor, magnetic media such as hard disk or floppy disks, and optical media such as for example DVD and the data variants thereof, CD. The physical media are non-transitory media.

[0111] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any combination, and in order to make the description concise, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combinations of the technical features do not exist contradictions, it should be considered that they are within the scope of the present disclosure.

[0112] The above embodiments only express several implementation manners of the present application, which are described in a more specific and detailed manner, but cannot be understood as a limitation on the scope of the present application. It should be noted that for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, which all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method for the synchronous fusion of virtual characters and virtual spaces on a virtual engine, characterized in that, The method comprises the following steps: acquiring driving information from different driving sources in a virtual engine, wherein the driving information comprises at least one of positioning information and controller control information, and the driving information is expressed in driving speed and driving direction; creating a Character class and creating a room Component component in the Character class, wherein the roomComponent component acquires real space position information of a user in a real physical space based on the positioning information, calculates role position change information and role change initial speed of a virtual role based on change of the real space position information of the current tick event, and the virtual role is the user in a coordinate system of a virtual space; a Movement Component component of the Character class acquires the role position change information, the role change initial speed, all the controller control information and self-displacement information of the current tick event, and simulates displacement of the current tick event to obtain a target position; the target position is forcibly synchronized to a client.

2. The method of claim 1, wherein, at the beginning of the current tick event, real space position change information is calculated based on the latest real space position information and real space position information of the last tick event; based on rotation information of the real physical space relative to the virtual space, the real space position change information is converted to obtain role position change information in a coordinate system of the virtual space; the time consumption of the current tick event is acquired, and a ratio of the role position change information to the time consumption is calculated to obtain role change initial speed. 3.The method of claim 2, wherein, when the time consumption of the current tick event is calculated, intervals of previous tick events are acquired to calculate an interval of the current tick event.

4. The method of claim 1, wherein, the current tick event is simulated in multiple segments, the position change vector obtained by previous segment simulation is used to offset the role position change information to obtain effective displacement, the role change initial speed is corrected based on the remaining displacement of the current tick event and the remaining time consumption of the current tick event to obtain role change speed, the effective displacement is substituted for the role position change information, and the role change speed is substituted for the role change initial speed to be used in next segment simulation to repeat operation, and the target position is obtained.

5. The method of claim 4, wherein, in the step of "using the position change vector obtained by previous segment simulation to offset the role position change information to obtain effective displacement", offset displacement in the same direction as the role position change information is separated from the position change vector, and the effective displacement is obtained by subtracting the offset displacement from the role position change information. 6.The method of claim 4, wherein, in the step of "correcting the role change initial speed based on the remaining displacement of the current tick event and the remaining time consumption of the current tick event to obtain role change speed", the quotient of the remaining displacement of the current tick event and the remaining time consumption of the current tick event is calculated to obtain the role change speed.

7. The method of claim 1, wherein, After the character position change information is offset to 0 after multiple segment simulations, all additional displacements generated in the remaining segment simulations will be executed as valid displacement amounts of the character position change information. 8.The method of claim 1, wherein, In the step of "forcing the target position to be synchronized to the client", when the character position change information after the current tick event ends has not been offset to 0, the remaining character position change information at this time is obtained, and the remaining character position change information is added to the target position and synchronized to the client. 9.The method of claim 1, wherein, The method comprises the steps of: Obtaining rotation data, wherein the rotation data comprises room orientation rotation data, controller orientation rotation data and performance orientation rotation data; Storing the rotation data and corresponding binding relationships in a PlayerState; Amending any of the rotation data to obtain amended rotation data and triggering a rotation event; After the component receives the rotation event, the calculation method is obtained from the binding relationship in the PlayerState, the amended rotation data and other rotation data are called to calculate the rotation angle and executed.

10. A device for the synchronous fusion of virtual characters and virtual spaces on a virtual engine, characterized in that, The method comprises the following steps: A driving information obtaining unit is configured to obtain driving information from different driving sources in a virtual engine, wherein the driving information comprises at least one of positioning information and controller control information, and the driving information is expressed in driving speed and driving direction; A positioning information data unit is configured to create a Character class and create a room Component component in the Character class, wherein the room Component component is configured to obtain real space position information of a user in a real physical space based on the positioning information, and calculate character position change information and character change initial speed based on changes in the real space position information of the current tick event, wherein the virtual character is a user in a coordinate system of a virtual space; A simulation displacement unit is configured to obtain the character position change information, the character change initial speed, all the controller control information and self-displacement information of the current tick event in the Movement Component component of the Character class, and perform simulation displacement on the current tick event to obtain a target position; A synchronization unit is configured to force the target position to be synchronized to the client.

Citation Information

Patent Citations

  • Mobile control method and apparatus in virtual reality

    CN108427501A

  • Virtual object wind animation rendering method and device, storage medium and electronic device

    CN112200896A