CN116310241A - Virtual character position control method, device, electronic equipment and storage medium - Google Patents

Virtual character position control method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116310241A
CN116310241A CN202310337872.6A CN202310337872A CN116310241A CN 116310241 A CN116310241 A CN 116310241A CN 202310337872 A CN202310337872 A CN 202310337872A CN 116310241 A CN116310241 A CN 116310241A
Authority
CN
China
Prior art keywords
target
virtual
map
area
virtual character
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310337872.6A
Other languages
Chinese (zh)
Other versions
CN116310241B (en
Inventor
王红梅
张志�
李宪超
李建华
何阳
卫继涛
周跃
崔凌云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Easy Times Digital Technology Co ltd
Original Assignee
Beijing Easy Times Digital Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Easy Times Digital Technology Co ltd filed Critical Beijing Easy Times Digital Technology Co ltd
Priority to CN202310337872.6A priority Critical patent/CN116310241B/en
Publication of CN116310241A publication Critical patent/CN116310241A/en
Application granted granted Critical
Publication of CN116310241B publication Critical patent/CN116310241B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a position control method, a device, electronic equipment and a storage medium for virtual characters, wherein the method comprises the following steps: acquiring a current map block where the virtual character is located; if the player is monitored to enter the peripheral extension area from the rectangular physical area, determining a target map block different from the current map block according to the moving track of the player and the current map block; determining target coordinates of the virtual character in the virtual space according to the coordinate mapping relation between the rectangular physical area and the target map block; migrating the virtual character from the current map block to the target coordinates; different coordinate mapping relations exist between the rectangular physical areas and different map blocks, so that position control of virtual roles in the virtual large space is accurately performed based on the small physical space, the use cost of the physical space is reduced on the basis of guaranteeing the experience of the large space VR, and the user experience is improved.

Description

Virtual character position control method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for controlling a position of a virtual character, an electronic device, and a storage medium.
Background
With the popularity of VR (Virtual Reality) head mounted displays, the VR technology is further understood by the public. With the progress of technology, VR technology ecology is more and more abundant, people also continuously mine application of VR technology in various fields, and technologies such as motion capture technology, eyeball tracking, gesture recognition and the like are integrated into a VR ecological circle to form specific application and unique experience. Among these technologies, particularly motion capture technology and VR fusion have received much attention, and a scheme of large-space multi-person interactive VR has been developed.
However, in the existing large-space multi-person interaction VR, a large physical space is required to be occupied, and some oversized virtual scenes are difficult to find a 1:1 ratio of physical space for experience, so that even if the physical space exists, high economic cost is caused.
Therefore, how to reduce the use cost of the physical space on the basis of guaranteeing the experience of the large space VR is a technical problem to be solved at present.
Disclosure of Invention
The embodiment of the application provides a position control method, a device, electronic equipment and a storage medium for a virtual character, which are used for reducing the use cost of a physical space on the basis of guaranteeing the experience of a large space VR.
In a first aspect, there is provided a position control method of a virtual character, in which at least one player exists in a rectangular physical area of a real physical space or a peripheral extension area of the rectangular physical area, the virtual character corresponding to the player being in a virtual area of a virtual space, the virtual area being composed of a plurality of map blocks having a shape and size identical to those of the rectangular physical area, the method comprising: acquiring a current map block where the virtual character is located; if the player is monitored to enter the peripheral extension area from the rectangular physical area, determining a target map block different from the current map block according to the moving track of the player and the current map block; determining target coordinates of the virtual character in the virtual space according to the coordinate mapping relation between the rectangular physical area and the target map block; migrating the virtual character from the current map tile to the target coordinates; wherein, there are different coordinate mapping relations between the rectangular physical area and different map blocks.
In a second aspect, there is provided a position control apparatus of a virtual character, in which at least one player is present in a rectangular physical area of a real physical space or a peripheral extension area of the rectangular physical area, the virtual character corresponding to the player being in a virtual area of a virtual space, the virtual area being composed of a plurality of map blocks having a shape and size in accordance with those of the rectangular physical area, the apparatus comprising: the acquisition module is used for acquiring the current map block where the virtual character is located; a first determining module, configured to determine a target map tile different from the current map tile according to a movement track of the player and the current map tile if the player is monitored to enter the peripheral extension area from the rectangular physical area; the second determining module is used for determining target coordinates of the virtual character in the virtual space according to the coordinate mapping relation between the rectangular physical area and the target map block; a migration module for migrating the virtual character from the current map tile to the target coordinates; wherein, there are different coordinate mapping relations between the rectangular physical area and different map blocks.
In a third aspect, there is provided an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the position control method of the virtual character of the first aspect via execution of the executable instructions.
In a fourth aspect, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the position control method of the virtual character according to the first aspect.
By applying the technical scheme, the current map block where the virtual character is located is obtained; if the player is monitored to enter the peripheral extension area from the rectangular physical area, determining a target map block different from the current map block according to the moving track of the player and the current map block; determining target coordinates of the virtual character in the virtual space according to the coordinate mapping relation between the rectangular physical area and the target map block; migrating the virtual character from the current map tile to the target coordinates; the rectangular physical areas and different map blocks have different coordinate mapping relations, so that position control of virtual roles in a virtual large space is accurately performed based on a small physical space, the use cost of the physical space is reduced on the basis of guaranteeing the VR experience feeling of the large space, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a method for controlling the position of a virtual character according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a player in a rectangular physical area in an embodiment of the invention;
FIG. 3 is a schematic diagram of a player entering a peripheral extension region from a rectangular physical region in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a virtual character position control device according to an embodiment of the present invention;
fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the present invention.
In fig. 2 and 3, 10, rectangular physical area; 11. a peripheral extension region; 20. a virtual area; 21. map blocks; 30. a player; 31. virtual roles.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The embodiment of the present application provides a position control method for a virtual character, as shown in fig. 2 and 3, in a rectangular physical area 10 of a real physical space or a peripheral extension area 11 of the rectangular physical area 10, there is at least one player 30, a virtual character 31 corresponding to the player 30 is in a virtual area 20 of the virtual space, the virtual area 20 is composed of a plurality of map tiles 21, and the shape and size of the map tiles 21 are consistent with those of the rectangular physical area 10, as shown in fig. 1, the method includes the following steps:
step S101, obtaining a current map block where the virtual character is located.
In this embodiment, the player wears the motion capture device, and based on the motion capture device, position data and motion data of the player can be acquired in real time, and the virtual character is a game character corresponding to the player, which is established in the virtual space, and the motion of the virtual character is synchronized with the motion of the player. The virtual character is in a virtual area, the virtual area is composed of a plurality of map blocks, and the current map block where the virtual character is obtained.
In some embodiments of the present application, prior to obtaining the current map tile in which the virtual character is located, the method further comprises:
acquiring a starting instruction;
generating the virtual space and the virtual role according to the starting instruction, and presenting the virtual role in an initial map block;
wherein the initial map tile is consistent with coordinates of the rectangular physical area.
In this embodiment, the start command may be input by the player or received from another server, and the virtual space and the virtual character are generated according to the start command, and then the virtual character is presented in an initial map block, where the initial map block is consistent with the coordinates of the rectangular physical area, so that the position of the virtual character is controlled more reliably.
Optionally, the initial map block is the most central map block in the virtual area, so that the virtual character can be ensured to have enough moving ranges in different directions.
Step S102, if it is detected that the player enters the peripheral extension area from the rectangular physical area, determining a target map tile different from the current map tile according to the movement track of the player and the current map tile.
In this embodiment, according to the dynamic capturing device, the position change of the player in the rectangular physical area is monitored in real time, if it is monitored that the player enters the peripheral extension area from the rectangular physical area, which means that the player has walked out of the rectangular physical area, the corresponding virtual character needs to leave the current map tile, and at this time, a target map tile different from the current map tile is determined according to the movement track of the player and the current map tile.
For example, in fig. 2, the coordinates of the player 30 in the real physical space are P1, the current map tile is a map tile overlapping with the rectangular physical area, the coordinates of the virtual character are also P1, and when it is monitored that the player 30 enters the peripheral extension area 11 from the rectangular physical area 10, the coordinates of the player 30 in the real physical space are P2 (as shown in fig. 3), a target map tile different from the current map tile is determined according to the movement track of the player 10 and the current map tile.
In some embodiments of the present application, a target map tile different from the current map tile is determined according to the movement track of the player and the current map tile, specifically:
determining the moving direction of the virtual character according to the moving track;
a next map tile adjacent to the current map tile in the direction of movement is determined and the next map tile is taken as the target map tile.
In this embodiment, since four sides exist in the rectangular physical area, four movement tracks exist from the rectangular physical area to the peripheral extension area, the movement direction of the virtual character is determined according to the movement tracks, and then the next map block adjacent to the current map block in the movement direction is used as the target map block, so that the target map block is determined more accurately. For example, if the map tile adjacent to the left side of the current map tile is map tile 1, the map tile adjacent to the right side of the current map tile is map tile 2, and the movement direction is left when the movement track is the peripheral extension area from the left side of the rectangular physical area, map tile 1 is regarded as the target map tile.
And step S103, determining the target coordinates of the virtual character in the virtual space according to the coordinate mapping relation between the rectangular physical area and the target map block.
In this embodiment, different coordinate mapping relations exist between the rectangular physical area and different map blocks. When a player is in a rectangular physical area, determining coordinates of a virtual character in a virtual space according to a coordinate mapping relation between the rectangular physical area and a current map block; after the target map block is determined, the coordinate mapping relation needs to be switched, the coordinate mapping relation between the rectangular physical area and the current map block is switched to the coordinate mapping relation between the rectangular physical area and the current map block, and the target coordinate of the virtual character in the virtual space is determined according to the coordinate mapping relation between the rectangular physical area and the target map block.
In some embodiments of the present application, the peripheral extension region includes a first region, a second region, a third region, and a fourth region, where the first region and the second region are extension regions of two side edges of the rectangular physical region in a length direction, and the third region and the fourth region are extension regions of two side edges of the rectangular physical region in a width direction, respectively.
In this embodiment, according to the positional relationship with the rectangular physical area in the length direction and the width direction, four peripheral extension areas, that is, the first area, the second area, the third area and the fourth area, are formed, so that the virtual character can be migrated to the target coordinates from different directions, and the position of the virtual character can be controlled more accurately.
In some embodiments of the present application, let the length of the rectangular physical area be L, the width of the rectangular physical area be W, and with the center point of the rectangular physical area as a zero point, the offset of the player in the length direction in the real physical space be x, the offset of the player in the width direction in the real physical space be z, and the coordinate mapping relationship between the rectangular physical area and the target map block is:
if x is less than 0 and the target map block is the nth map block after the initial map block in the length direction, the target coordinate P' is (x-n x L, z);
if x > 0 and the target map block is the nth map block after the initial map block in the length direction, the target coordinate P' is (x+n×l, z);
if z < 0 and the target map tile is the nth map tile following the initial map tile in the width direction, the target coordinate P' is (x, z-n×w);
if z > 0 and the target map tile is the nth map tile following the initial map tile in the width direction, the target coordinate P' is (x, z+n×w);
wherein the initial map tile is consistent with coordinates of the rectangular physical area.
In this embodiment, the coordinates of the original map tile and the rectangular physical area are consistent, as shown in fig. 2 and 3, the length L and the width W of the rectangular physical area 10 are set, the center point of the rectangular physical area 10 is zero, the offset of the player 30 in the length direction in the real physical space is x, the offset of the player 30 in the width direction in the real physical space is z, x is kept between-L/2 and L/2 in the rectangular physical area 10, and z is kept between-W/2 and W/2. The coordinate mapping relationship between the rectangular physical area and the target map block is as follows: if x is less than 0 and the target map block is the nth map block after the initial map block in the length direction, x is required to be shifted leftwards by n L, and P' is (x-n x L, z); if x > 0 and the target map block is the nth map block after the initial map block in the length direction, x is required to be shifted to the right by n L, and the target coordinate P' is (x+n×l, z); if z < 0 and the target map tile is the nth map tile widthwise following the initial map tile, then z is shifted downward by n L, and the target coordinate P' is (x, z-n×w); if z > 0 and the target map tile is the nth map tile after the initial map tile in the width direction, the z needs to be shifted by n L, and the target coordinate P' is (x, z+n×w), so that the position of the virtual character is more accurately controlled.
Step S104, the virtual character is migrated from the current map block to the target coordinates.
In this embodiment, after determining the target coordinates, the virtual character is migrated from the current map block to the target coordinates, and in the specific application scenario of the present application, as shown in fig. 3, the target coordinates are P ', and the virtual character 31 is migrated from the current map block to the target coordinates P'.
In some embodiments of the present application, after migrating the virtual character from the current map tile to the target coordinates, the method further comprises:
if the player returns to the rectangular physical area from the peripheral extension area, determining new target coordinates of the virtual character in the virtual space according to the coordinate mapping relation between the rectangular physical area and the target map block;
and moving the virtual character from the target coordinate to the new target coordinate.
In this embodiment, if it is monitored that the player returns to the rectangular physical area from the peripheral extension area, the coordinate mapping relationship is not required to be switched at this time, the coordinate mapping relationship between the rectangular physical area and the target map block is continuously used, a new target coordinate of the virtual character in the virtual space is determined according to the coordinate mapping relationship, and then the virtual character is moved from the target coordinate to the new target coordinate, so that the position of the virtual character is more accurately controlled.
For example, as shown in FIG. 3, the target map tile is the map tile adjacent to the left side of rectangular physical area 10, and if player 30 returns to rectangular physical area 10 from coordinate P2 in peripheral extension area 11, virtual character 31 is moved from coordinate P' to the new target coordinate within the target map tile, which is determined by the coordinate mapping relationship between rectangular physical area 10 and the target map tile.
In some embodiments of the present application, each of the map tiles has a number uniquely corresponding to itself, and after migrating the virtual character from the current map tile to the target coordinates, the method further comprises:
if the real physical space also comprises other players, sending the coordinates of the players in the real physical space and the numbers of the map blocks where the virtual characters are located to the other players;
and setting the visual effect of the virtual character corresponding to the other player according to the setting instruction sent by the other player.
In this embodiment, each map block has a number uniquely corresponding to itself, and the number may be generated according to a preset rule or may be generated randomly. If the real physical space also comprises other players, after the virtual character is migrated from the current map block to the target coordinate, the coordinates of the players in the real physical space and the numbers of the map blocks where the virtual character is located are sent to other players, and the other players judge whether the virtual character is located in the same map block with the players according to the coordinates and the numbers, so that the other players can send out setting instructions to set the visual effect of the virtual character of the players, for example, if the other players are located in the same map block with the players, the other players can set more remarkable visual effect of the virtual character of the players, and therefore safety in the game process is improved, and user experience is improved.
In addition to setting visual effects of virtual roles of other players according to the setting instructions sent by other players, the setting can also be automatically performed, specifically, if the player is in the same map block with other players, the virtual roles of other players are set as entity models, and if the player is not in the same map block with other players, the virtual roles of other players are set as semitransparent models.
By applying the technical scheme, the current map block where the virtual character is located is obtained; if the player is monitored to enter the peripheral extension area from the rectangular physical area, determining a target map block different from the current map block according to the moving track of the player and the current map block; determining target coordinates of the virtual character in the virtual space according to the coordinate mapping relation between the rectangular physical area and the target map block; migrating the virtual character from the current map tile to the target coordinates; the rectangular physical areas and different map blocks have different coordinate mapping relations, so that position control of virtual roles in a virtual large space is accurately performed based on a small physical space, the use cost of the physical space is reduced on the basis of guaranteeing the VR experience feeling of the large space, and the user experience is improved.
In order to further explain the technical idea of the invention, the technical scheme of the invention is described with specific application scenarios.
The embodiment of the application provides a position control method of a virtual character, which comprises the following steps:
step 1, setting a rectangular physical area in a real physical space.
And obtaining the size of the rectangular physical area through measurement, and finishing setting the rectangular physical area according to the measured value input by the user at the setting interface.
And 2, cutting the virtual area in the virtual space into a plurality of map blocks according to the shape and the size of the rectangular physical area, and setting numbers for the map blocks.
And step 3, obtaining the position of the player in the physical space according to the dynamic capture data.
After the game is started, the virtual character of the player initially appears in the most central map block (namely the initial map block), the map block is completely matched with the rectangular physical area, and the player wears the dynamic capture device on the player, so that the position data and the action data of the player can be acquired in real time based on the dynamic capture device.
And 4, the player moves and interacts in the physical space, the position change of the player in the rectangular physical area is monitored, and whether the player enters the peripheral extension area from the rectangular physical area is judged.
And 5, if the player is monitored to enter the peripheral extension area from the rectangular physical area, determining a target map block different from the current map block according to the moving track of the player and the current map block where the virtual character is located.
And 6, determining the target coordinates of the virtual character in the virtual space according to the coordinate mapping relation between the rectangular physical area and the target map block.
And 7, migrating the virtual character from the current map block to the target coordinates.
And 8, if the real physical space also comprises other players, sending the coordinates of the players in the real physical space and the numbers of the map blocks where the virtual characters are located to the other players.
And 9, setting the virtual roles corresponding to other players as a solid model or a semitransparent model according to setting instructions sent by other players.
The embodiment of the application also provides a position control device for a virtual character, wherein at least one player exists in a rectangular physical area of a real physical space or a peripheral extension area of the rectangular physical area, the virtual character corresponding to the player is located in a virtual area of a virtual space, the virtual area is composed of a plurality of map blocks, and the shape and the size of the map blocks are consistent with those of the rectangular physical area, as shown in fig. 4, the device comprises:
an obtaining module 401, configured to obtain a current map block where the virtual character is located;
a first determining module 402, configured to determine a target map tile different from the current map tile according to the movement track of the player and the current map tile if the player is monitored to enter the peripheral extension area from the rectangular physical area;
a second determining module 403, configured to determine, according to a coordinate mapping relationship between the rectangular physical area and the target map tile, a target coordinate of the virtual character in the virtual space;
a migration module 404 for migrating the virtual character from the current map tile to the target coordinates;
wherein, there are different coordinate mapping relations between the rectangular physical area and different map blocks.
In a specific application scenario, the peripheral extension area includes a first area, a second area, a third area and a fourth area, the first area and the second area are extension areas of two side edges of the rectangular physical area in the length direction respectively, and the third area and the fourth area are extension areas of two side edges of the rectangular physical area in the width direction respectively.
In a specific application scenario, let the length of the rectangular physical area be L, the width of the rectangular physical area be W, and take the center point of the rectangular physical area as a zero point, the offset of the player in the length direction in the real physical space be x, the offset of the player in the width direction in the real physical space be z, and the coordinate mapping relationship between the rectangular physical area and the target map block is:
if x is less than 0 and the target map block is the nth map block after the initial map block in the length direction, the target coordinate P' is (x-n x L, z);
if x > 0 and the target map block is the nth map block after the initial map block in the length direction, the target coordinate P' is (x+n×l, z);
if z < 0 and the target map tile is the nth map tile following the initial map tile in the width direction, the target coordinate P' is (x, z-n×w);
if z > 0 and the target map tile is the nth map tile following the initial map tile in the width direction, the target coordinate P' is (x, z+n×w);
wherein the initial map tile is consistent with coordinates of the rectangular physical area.
In a specific application scenario, the first determining module 402 is specifically configured to:
determining the moving direction of the virtual character according to the moving track;
a next map tile adjacent to the current map tile in the direction of movement is determined and the next map tile is taken as the target map tile.
In a specific application scenario, the apparatus further includes a mobile module configured to:
if the player returns to the rectangular physical area from the peripheral extension area, determining new target coordinates of the virtual character in the virtual space according to the coordinate mapping relation between the rectangular physical area and the target map block;
and moving the virtual character from the target coordinate to the new target coordinate.
In a specific application scenario, each map block is provided with a number uniquely corresponding to the map block, and the device further comprises a setting module, configured to:
if the real physical space also comprises other players, sending the coordinates of the players in the real physical space and the numbers of the map blocks where the virtual characters are located to the other players;
and setting the visual effect of the virtual character corresponding to the other player according to the setting instruction sent by the other player.
In a specific application scenario, the device further includes a starting module, configured to:
acquiring a starting instruction;
generating the virtual space and the virtual role according to the starting instruction, and presenting the virtual role in an initial map block;
wherein the initial map tile is consistent with coordinates of the rectangular physical area.
The embodiment of the invention also provides an electronic device, as shown in fig. 5, which comprises a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 complete communication with each other through the communication bus 504,
a memory 503 for storing executable instructions of the processor;
a processor 501 configured to execute via execution of the executable instructions:
acquiring a current map block where the virtual character is located; if the player is monitored to enter the peripheral extension area from the rectangular physical area, determining a target map block different from the current map block according to the moving track of the player and the current map block; determining target coordinates of the virtual character in the virtual space according to the coordinate mapping relation between the rectangular physical area and the target map block; migrating the virtual character from the current map tile to the target coordinates; wherein, there are different coordinate mapping relations between the rectangular physical area and different map blocks.
The communication bus may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or an EISA (Extended Industry Standard Architecture ) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include RAM (Random Access Memory ) or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but also DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In still another embodiment of the present invention, there is also provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the position control method of the virtual character as described above.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the method of position control of a virtual character as described above.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (10)

1. A position control method of a virtual character, characterized in that at least one player exists in a rectangular physical area of a real physical space or a peripheral extension area of the rectangular physical area, the virtual character corresponding to the player is in a virtual area of a virtual space, the virtual area is composed of a plurality of map blocks, the shape and size of the map blocks are consistent with those of the rectangular physical area, the method comprising:
acquiring a current map block where the virtual character is located;
if the player is monitored to enter the peripheral extension area from the rectangular physical area, determining a target map block different from the current map block according to the moving track of the player and the current map block;
determining target coordinates of the virtual character in the virtual space according to the coordinate mapping relation between the rectangular physical area and the target map block;
migrating the virtual character from the current map tile to the target coordinates;
wherein, there are different coordinate mapping relations between the rectangular physical area and different map blocks.
2. The method of claim 1, wherein the peripheral extension region comprises a first region, a second region, a third region, and a fourth region, the first region and the second region being extension regions of both side edges of the rectangular physical region in a length direction, respectively, the third region and the fourth region being extension regions of both side edges of the rectangular physical region in a width direction, respectively.
3. The method of claim 2, wherein, assuming that the length of the rectangular physical area is L, the width of the rectangular physical area is W, the offset of the player in the length direction in the real physical space is x, the offset of the player in the width direction in the real physical space is z, and the coordinate mapping relationship between the rectangular physical area and the target map tile is:
if x is less than 0 and the target map block is the nth map block after the initial map block in the length direction, the target coordinate P' is (x-n x L, z);
if x > 0 and the target map block is the nth map block after the initial map block in the length direction, the target coordinate P' is (x+n×l, z);
if z < 0 and the target map tile is the nth map tile following the initial map tile in the width direction, the target coordinate P' is (x, z-n×w);
if z > 0 and the target map tile is the nth map tile following the initial map tile in the width direction, the target coordinate P' is (x, z+n×w);
wherein the initial map tile is consistent with coordinates of the rectangular physical area.
4. The method of claim 1, wherein a target map tile different from the current map tile is determined based on the player's movement trajectory and the current map tile, in particular:
determining the moving direction of the virtual character according to the moving track;
a next map tile adjacent to the current map tile in the direction of movement is determined and the next map tile is taken as the target map tile.
5. The method of claim 1, wherein after migrating the avatar from the current map tile to the target coordinates, the method further comprises:
if the player returns to the rectangular physical area from the peripheral extension area, determining new target coordinates of the virtual character in the virtual space according to the coordinate mapping relation between the rectangular physical area and the target map block;
and moving the virtual character from the target coordinate to the new target coordinate.
6. The method of claim 1, wherein each of the map tiles has a number uniquely corresponding to itself, the method further comprising, after migrating the virtual character from the current map tile to the target coordinates:
if the real physical space also comprises other players, sending the coordinates of the players in the real physical space and the numbers of the map blocks where the virtual characters are located to the other players;
and setting the visual effect of the virtual character corresponding to the other player according to the setting instruction sent by the other player.
7. The method of claim 1, wherein prior to obtaining a current map tile in which the avatar is located, the method further comprises:
acquiring a starting instruction;
generating the virtual space and the virtual role according to the starting instruction, and presenting the virtual role in an initial map block;
wherein the initial map tile is consistent with coordinates of the rectangular physical area.
8. A position control apparatus of a virtual character, wherein at least one player is present in a rectangular physical area of a real physical space or a peripheral extension area of the rectangular physical area, the virtual character corresponding to the player is in a virtual area of a virtual space, the virtual area is composed of a plurality of map blocks, and the shape and size of the map blocks are identical to those of the rectangular physical area, the apparatus comprising:
the acquisition module is used for acquiring the current map block where the virtual character is located;
a first determining module, configured to determine a target map tile different from the current map tile according to a movement track of the player and the current map tile if the player is monitored to enter the peripheral extension area from the rectangular physical area;
the second determining module is used for determining target coordinates of the virtual character in the virtual space according to the coordinate mapping relation between the rectangular physical area and the target map block;
a migration module for migrating the virtual character from the current map tile to the target coordinates;
wherein, there are different coordinate mapping relations between the rectangular physical area and different map blocks.
9. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the position control method of the virtual character of any one of claims 1 to 7 via execution of the executable instructions.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the position control method of a virtual character according to any one of claims 1 to 7.
CN202310337872.6A 2023-03-31 2023-03-31 Virtual character position control method, device, electronic equipment and storage medium Active CN116310241B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310337872.6A CN116310241B (en) 2023-03-31 2023-03-31 Virtual character position control method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310337872.6A CN116310241B (en) 2023-03-31 2023-03-31 Virtual character position control method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116310241A true CN116310241A (en) 2023-06-23
CN116310241B CN116310241B (en) 2023-10-13

Family

ID=86825729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310337872.6A Active CN116310241B (en) 2023-03-31 2023-03-31 Virtual character position control method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116310241B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1031412A (en) * 1996-07-16 1998-02-03 Namco Ltd Three-dimension simulator equipment and information storage medium
JP2000300842A (en) * 1999-04-19 2000-10-31 Namco Ltd Game apparatus, image-data generation tool and information memory medium
US20130225289A1 (en) * 2010-09-30 2013-08-29 Kabushiki Kaisha Sega Dba Sega Corporation Image processing apparatus and computer-readable storage medium
US20180357817A1 (en) * 2017-06-12 2018-12-13 Colopl, Inc. Information processing method, program, and computer
US20180373328A1 (en) * 2017-05-26 2018-12-27 Colopl, Inc. Program executed by a computer operable to communicate with head mount display, information processing apparatus for executing the program, and method executed by the computer operable to communicate with the head mount display
US20190251717A1 (en) * 2016-12-20 2019-08-15 Alibaba Group Holding Limited Method and apparatus for generating and updating tiles maps in virtual maps
US10650591B1 (en) * 2016-05-24 2020-05-12 Out of Sight Vision Systems LLC Collision avoidance system for head mounted display utilized in room scale virtual reality system
US20210339122A1 (en) * 2020-05-04 2021-11-04 MassVR, LLC Systems and Methods for Utilizing Multiple Mapping Schemes in a Virtual Reality Environment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1031412A (en) * 1996-07-16 1998-02-03 Namco Ltd Three-dimension simulator equipment and information storage medium
JP2000300842A (en) * 1999-04-19 2000-10-31 Namco Ltd Game apparatus, image-data generation tool and information memory medium
US20130225289A1 (en) * 2010-09-30 2013-08-29 Kabushiki Kaisha Sega Dba Sega Corporation Image processing apparatus and computer-readable storage medium
US10650591B1 (en) * 2016-05-24 2020-05-12 Out of Sight Vision Systems LLC Collision avoidance system for head mounted display utilized in room scale virtual reality system
US20190251717A1 (en) * 2016-12-20 2019-08-15 Alibaba Group Holding Limited Method and apparatus for generating and updating tiles maps in virtual maps
US20180373328A1 (en) * 2017-05-26 2018-12-27 Colopl, Inc. Program executed by a computer operable to communicate with head mount display, information processing apparatus for executing the program, and method executed by the computer operable to communicate with the head mount display
US20180357817A1 (en) * 2017-06-12 2018-12-13 Colopl, Inc. Information processing method, program, and computer
US20210339122A1 (en) * 2020-05-04 2021-11-04 MassVR, LLC Systems and Methods for Utilizing Multiple Mapping Schemes in a Virtual Reality Environment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
单盛: "基于虚拟现实的复杂场景非显著目标跟踪方法研究", 《齐齐哈尔大学学报(自然科学版)》, pages 53 - 58 *
熊俊臻;王保录;黄琰淦;李建华;梁汉宁;任文鹏;罗远鸿;王红梅;何桂品;陈翔;: "基于AR技术的5G智慧工厂培训系统的设计及实现", 广东通信技术, no. 07, pages 49 - 52 *

Also Published As

Publication number Publication date
CN116310241B (en) 2023-10-13

Similar Documents

Publication Publication Date Title
US11883741B2 (en) Information processing method and apparatus, mobile terminal, and storage medium
CN111957040B (en) Detection method and device for shielding position, processor and electronic device
CN109718538B (en) Method and device for frame selection of virtual object in game, electronic equipment and storage medium
RU2701988C2 (en) Parametric inertia and application programming interfaces
US9753545B2 (en) Input device, input method, and storage medium
CN104076986A (en) Touch control method and equipment used for multi-touch screen terminal
CN110575671B (en) Method and device for controlling viewing angle in game and electronic equipment
CN109491579B (en) Method and device for controlling virtual object
CN109663345B (en) Information processing method and device for 3D game
CN109107153B (en) Method and device for releasing game skill, electronic equipment and storage medium
CN107678652B (en) Operation control method and device for target object
CN109983424B (en) Method and device for selecting object in virtual reality scene and virtual reality equipment
CN105824491A (en) Split screen processing method and device in mobile equipment
CN108733288B (en) Information processing method, information processing device, electronic equipment and storage medium
CN108905203A (en) Information processing method, device, storage medium and electronic device
KR20160023831A (en) Widget area adjustment method and device
CN113680065A (en) Map processing method and device in game
CN112306363B (en) Mouse simulation method and device, display equipment and storage medium
US20160364031A1 (en) Storage medium, display control device, display control system, and display method
CN116310241B (en) Virtual character position control method, device, electronic equipment and storage medium
CN112287708A (en) Near Field Communication (NFC) analog card switching method, device and equipment
CN110321184B (en) Scene mapping method and computer storage medium
CN113867863A (en) Graphic code processing method and device
CN113926186A (en) Method and device for selecting virtual object in game and touch terminal
CN107977130B (en) Interaction method and device of Flash player and server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant