Program, information processing apparatus, information processing system, and information processing method
The system improves object visibility in virtual spaces by adjusting the virtual camera's position and orientation based on distance and relationship, addressing the challenge of maintaining clear visibility of target objects.
Patent Information
- Application Number
- JP2024147239
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2044-08-29
AI Technical Summary
Existing virtual space image generation technologies struggle to ensure that target objects are easily visible within a virtual space, particularly when the distance and positional relationship between objects change.
A system that includes a virtual space setting unit, a virtual camera control unit, and a target setting unit to adjust the position and orientation of a virtual camera based on the distance between a first object and a second object, ensuring they maintain a predetermined positional relationship in the image.
This system enhances the visibility of objects in virtual spaces by dynamically adjusting the virtual camera's position and orientation, allowing for clearer visualization of target objects regardless of distance and positional changes.
Smart Images

Figure 0007701531000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a program, an information processing apparatus, an information processing system, and an information processing method for generating an image of a virtual space as seen from a virtual camera.
Background Art
[0002] Conventionally, it has been possible to set a target object from a plurality of objects arranged in a virtual space, and an information processing apparatus that generates an image of a virtual space including a player object and a target object is known (see Patent Document 1).
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] In an image of a virtual space in which a plurality of objects are arranged as described above, it is desired to generate an image in which the target object is easy to see.
[0005] The present invention has been made in view of the above circumstances, and an object thereof is to provide a program, an information processing apparatus, an information processing system, and an information processing method for improving the visibility of objects in a virtual space.
Means for Solving the Problems
[0006] The present invention relates to a program for generating an image of a virtual space as seen from a virtual camera, the program causing a computer to function as a virtual space setting unit that sets the virtual space in which a first object and a second object are arranged, a virtual camera control unit that controls the position and orientation of the virtual camera that follows the first object, and a target setting unit that enables the second object to be set as a target in response to a player's input, and the virtual camera control unit, when the second object is set as a target, controls at least one of the position and orientation of the virtual camera according to the distance from the first object to the second object so that the first object and the second object are displayed in a predetermined positional relationship in the image of the virtual space as seen from the virtual camera.
[0007] The present invention also relates to an information processing apparatus for generating an image of a virtual space as seen from a virtual camera, the apparatus including a virtual space setting unit that sets the virtual space in which a first object and a second object are arranged, a virtual camera control unit that controls the position and orientation of the virtual camera that follows the first object, and a target setting unit that enables the second object to be set as a target in response to a player's input, and the virtual camera control unit controls at least one of the position and orientation of the virtual camera according to the distance from the first object to the second object so that the first object and the second object are displayed in a predetermined positional relationship in the image of the virtual space as seen from the virtual camera when the second object is set as a target.
[0008] The present invention also relates to an information processing system for generating an image of a virtual space as seen from a virtual camera, including: a virtual space setting unit that sets the virtual space in which a first object and a second object are arranged; a virtual camera control unit that controls the position and orientation of the virtual camera that follows the first object; and a target setting unit that enables the second object to be set as a target in response to a player's input. When the second object is set as a target, the virtual camera control unit controls at least one of the position and orientation of the virtual camera according to the distance from the first object to the second object so that the first object and the second object are displayed in a predetermined positional relationship in the image of the virtual space as seen from the virtual camera.
[0009] The present invention also relates to an information processing method for generating an image of a virtual space as seen from a virtual camera, including: a virtual space setting step of setting the virtual space in which a first object and a second object are arranged; a virtual camera control step of controlling the position and orientation of the virtual camera that follows the first object; and a target setting step of enabling the second object to be set as a target in response to a player's input. The computer is caused to execute these steps. In the virtual camera control step, when the second object is set as a target, at least one of the position and orientation of the virtual camera is controlled according to the distance from the first object to the second object so that the first object and the second object are displayed in a predetermined positional relationship in the image of the virtual space as seen from the virtual camera.
[0010] In the above program, information processing apparatus, information processing system, and information processing method, it is possible to display the first object that is the tracking target of the virtual camera and the second object that is set as the target in an appropriate positional relationship, and an image with improved visibility of the object can be generated.
[0011] In the above program, information processing apparatus, information processing system, and information processing method, when the distance from the first object to the second object in the virtual space is within a range from a first distance to a second distance that is farther than the first distance, the virtual camera control unit (or in the virtual camera control step) can control at least one of the horizontal position and orientation of the virtual camera such that the second object is displayed closer to the vertical axis passing through the first object in the image of the virtual space seen from the virtual camera as the second object is farther from the first object.
[0012] In the above program, information processing apparatus, information processing system, and information processing method, when the distance from the first object to the second object in the virtual space is equal to or less than the first distance, the virtual camera control unit (or in the virtual camera control step) can control at least one of the horizontal position and orientation of the virtual camera such that the second object is displayed on an axis forming a first angle with respect to the vertical axis passing through the first object in the image of the virtual space seen from the virtual camera.
[0013] In the above program, information processing apparatus, information processing system, and information processing method, when the distance from the first object to the second object in the virtual space is equal to or greater than the second distance, the virtual camera control unit (or in the virtual camera control step) can control at least one of the horizontal position and orientation of the virtual camera such that the second object is displayed on an axis forming a second angle narrower than the first angle with respect to the vertical axis passing through the first object in the image of the virtual space seen from the virtual camera.
[0014] In the above program, information processing apparatus, information processing system, and information processing method, when the distance from the first object to the second object in the virtual space is within the range from the first distance to the second distance, the virtual camera control unit (or in the virtual camera control step) can control at least one of the vertical position and orientation of the virtual camera in the virtual space such that the higher the second object is from the first object, the higher the position of the virtual camera in the virtual space becomes.
[0015] In the above program, information processing apparatus, information processing system, and information processing method, when the distance from the first object to the second object in the virtual space is greater than or equal to the second distance, the virtual camera control unit (or in the virtual camera control step) can control at least one of the vertical position and orientation of the virtual camera according to the distance from the virtual camera to the first object.
[0016] In the above program, information processing apparatus, information processing system, and information processing method, when the distance from the virtual camera to the first object in the virtual space is within the range from the third distance to the fourth distance which is farther than the third distance, the virtual camera control unit (or in the virtual camera control step) can control at least one of the vertical position and orientation of the virtual camera in the virtual space such that the farther the virtual camera is from the first object, the lower the position of the virtual camera in the virtual space becomes.
Brief Description of the Drawings
[0017]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Embodiments for Carrying Out the Invention
[0018] Hereinafter, embodiments of the present invention will be described. Note that the embodiments described below do not unduly limit the content of the present invention described in the claims. Also, not all of the configurations described in the embodiments are essential constituent elements of the present invention.
[0019] FIG. 1 is a schematic block diagram showing the configuration of the information processing system 10 of the present embodiment. As shown in FIG. 1, in the information processing system 10, a server device 12 and a plurality of terminal devices 14 are connected by a network 16 such as the Internet, a mobile phone network, a LAN, or a WAN, and a so-called client-server type communication system is configured. Each of the plurality of terminal devices 14 communicates with the server device 12 via the network 16 to transmit and receive various information, and communicates with other terminal devices 14 via the network 16 and the server device 12 to transmit and receive various information.
[0020] The server device 12 includes a processor such as a CPU, a main storage device such as a ROM and a RAM, an external storage device such as a hard disk, an input device such as a keyboard, a display device such as a liquid crystal display, and a communication device. In the server device 12, the CPU executes various processes according to programs stored in the main storage device or programs loaded from the external storage device to the main storage device, receives information from the terminal device 14 by the communication device, and transmits information to the terminal device 14.
[0021] The terminal device 14 can be an information processing device in various forms such as a smartphone, a tablet, a personal computer, a portable game machine, a stationary game machine, etc. The terminal device 14 includes a processor such as a CPU, a main storage device such as a ROM and a RAM, an external storage device such as a flash memory and a hard disk, an input device such as a touch panel, a keyboard, and a microphone, a display device such as a liquid crystal display and an organic EL display, a sound output device such as a speaker, and a communication device. Then, the terminal device 14 has the CPU execute various processes according to the programs stored in the main storage device and the programs loaded from the external storage device to the main storage device, receive information from the server device 12 by the communication device, and transmit information to the server device 12 and other terminal devices 14.
[0022] FIG. 2 is a functional block diagram showing the functions of the server device 12 of the present embodiment. As shown in FIG. 2, the server device 12 of the present embodiment includes a server information storage medium 20, a server storage unit 30, a server communication unit 36, and a server information processing unit 40. Note that a configuration in which a part of the components (each unit) in FIG. 2 is omitted may also be used.
[0023] The server information storage medium 20 stores programs, data, etc. for the server information processing unit 40 and the server communication unit 36 to perform various processes, and its function can be realized by a flash memory, a hard disk, an optical disk (DVD, BD), etc. That is, the server information storage medium 20 stores a program for causing a computer to function as each unit of the present embodiment (a program for causing a computer to execute the processing of each unit).
[0024] The server storage unit 30 serves as a work area for the server information processing unit 40 and the server communication unit 36, and its function can be realized by a RAM (main memory), a VRAM (video memory), etc. Specifically, the server storage unit 30 includes a main storage unit 32 from which programs and data are read from the server information storage medium 20.
[0025] The server communication unit 36 performs various controls for communication with an external network (for example, another server device 12 or terminal device 14), and its functions can be realized by various processors (CPU (main processor), GPU (graphics processor), DSP, etc.), hardware such as a communication ASIC, or a program.
[0026] The server information processing unit 40 performs various processes such as game processing based on the received data received by the server communication unit 36, various programs and data in the server storage unit 30, etc., using the main storage unit 32 as a work area, and its functions can be realized by various processors, hardware such as an ASIC, or a program.
[0027] The server information processing unit 40 includes a server game processing unit 42 and a server communication control unit 48. Note that a configuration in which some of these are omitted may also be used.
[0028] The server game processing unit 42, based on the received data received by the server communication unit 36, the results of various processes performed by the server information processing unit 40, the programs and data read into the main storage unit 32, etc., starts the game when the game start conditions are satisfied, executes the selected game function among multiple types of game functions, matches a plurality of players (player identification information, player ID) to form one group, makes the plurality of players forming one group participate in a common game, controls a battle game, advances the game, determines game media such as characters and items provided (granted) to the player by lottery from a plurality of game media, generates an event when the event occurrence conditions are satisfied, calculates the game result, or ends the game when the game end conditions are satisfied, etc.
[0029] The server communication control unit 48 causes the server communication unit 36 to communicate with other server devices 12 or terminal devices 14 and performs processes for transmitting and receiving various information. For example, the server communication control unit 48 causes the server communication unit 36 to transmit and receive information necessary for the process of newly registering a player in the information processing system 10, information necessary for the process of logging in a player to the information processing system 10, information necessary for the process of setting an opponent player to cooperate or compete with the logged-in player, information necessary for the process of synchronizing a plurality of terminal devices 14, and information necessary for the process of executing a common game on the plurality of terminal devices 14. Further, the server communication control unit 48 also causes the server communication unit 36 to transmit and receive destination information indicating the destination of the information, source information indicating the source of the information, identification information for identifying the information processing system 10 that generated the information, and the like.
[0030] FIG. 3 is a functional block diagram showing the functions of the terminal device 14 of the present embodiment. As shown in FIG. 3, the terminal device 14 of the present embodiment includes a player input detection unit 50, a display unit 52, a sound output unit 54, a terminal information storage medium 56, a terminal storage unit 60, a terminal communication unit 66, and a terminal information processing unit 100. Note that a configuration in which a part of the components (each unit) in FIG. 3 is omitted may also be used.
[0031] The player input detection unit 50 is for detecting an input to the terminal device 14 by a player as a player input, and its function can be realized by a touch sensor, a switch, an optical sensor, a variable resistor type sensor (potentiometer), an acceleration sensor, a microphone, or the like.
[0032] The display unit 52 displays an image on the display screen, and its function can be realized by a liquid crystal display, an organic EL display, or the like.
[0033] The sound output unit 54 outputs sound, and its function can be realized by a speaker, headphones, or the like.
[0034] The terminal information storage medium 56 stores programs, data, etc. for the terminal information processing unit 100 and the terminal communication unit 66 to perform various processes, and its functions can be realized by a flash memory, a hard disk, an optical disk (DVD, BD), etc. That is, the terminal information storage medium 56 stores a program (a program for causing a computer to execute the processes of each part) for causing a computer to function as each part of the present embodiment.
[0035] The terminal storage unit 60 serves as a work area for the terminal information processing unit 100 and the terminal communication unit 66, and its functions can be realized by a RAM (main memory), a VRAM (video memory), etc. Specifically, the terminal storage unit 60 includes a main storage unit 62 from which programs and data are read from the terminal information storage medium 56, and a drawing buffer 64 on which an image to be displayed on the display unit 52 is drawn.
[0036] The terminal communication unit 66 performs various controls for communicating with an external network (for example, the server device 12 and other terminal devices 14), and its functions can be realized by hardware such as various processors or communication ASICs, programs, etc.
[0037] Note that the program (data) for causing a computer to function as each part of the present embodiment may be downloaded from the server device 12 to the terminal information storage medium 56 (or the main storage unit 62) of the terminal device 14 via the network 16 and the terminal communication unit 66, and the use of such a server device 12 can also be included within the scope of the present invention.
[0038] Based on the player input detected by the player input detection unit 50, the received data received by the terminal communication unit 66, and various programs and data in the terminal storage unit 60, the terminal information processing unit 100 performs various processes such as game processing, image generation processing, and sound generation processing, using the main storage unit 62 as a work area, and its functions can be realized by hardware such as various processors (CPU (main processor), GPU (drawing processor), DSP, etc.), ASICs, and programs.
[0039] And the terminal information processing unit 100 includes a terminal game processing unit 102, an input reception unit 103, a display control unit 104, an image generation unit 108, a sound generation unit 110, and a terminal communication control unit 112. Note that a configuration in which some of these are omitted may also be used.
[0040] The terminal game processing unit 102 (game processing unit) starts a game when the game start condition is satisfied, executes a selected game function among a plurality of types of game functions, matches the player (player ID) of the own terminal with the player (other player ID) of another terminal to participate in a common game, controls a battle game, advances the game, generates an event when the event generation condition is satisfied, updates various parameters of the player or character of the own terminal, calculates the game result, or ends the game when the game end condition is satisfied, based on the player input detected by the player input detection unit 50, the received data received by the terminal communication unit 66, the results of various processes performed by the terminal information processing unit 100, the programs and data read into the main storage unit 62, and the like.
[0041] The input reception unit 103 accepts the player's input as an input according to the situation or does not accept the player's input, based on the player input detected by the player input detection unit 50, the received data received by the terminal communication unit 66, the results of various processes performed by the terminal information processing unit 100, the programs and data read into the main storage unit 62, and the like. For example, when a GUI such as a button is displayed and the GUI is tapped, it is accepted as an input according to the type of the displayed GUI.
[0042] The display control unit 104 performs display control of the image displayed on the display unit 52. Specifically, based on the player input detected by the player input detection unit 50, the received data received by the terminal communication unit 66, the results of various processes performed by the terminal information processing unit 100, the programs and data read into the main memory unit 62, etc., it performs display control such as the display content, display mode, and display timing of various objects and prerendered images (movie images).
[0043] For example, object data of various objects such as a background object for displaying a background, an effect object for displaying an effect, a GUI (Graphic User Interface) object for displaying a GUI such as a button, a character object (first object) that the player can operate to move or act, and one or more enemy characters (second objects) that the player cannot operate to move or act, a non-character object for displaying objects other than characters such as buildings, props, vehicles, and terrain, and image data of various prerendered images are stored in the terminal information storage medium 56.
[0044] Then, the display control unit 104 performs display control of the object and the prerendered image based on the object data and the image data of the prerendered image read into the main memory unit 62 according to the type of the game function being executed and the progress of the game.
[0045] Here, when the display control unit 104 is to display a three-dimensional game image, based on the object data read into the main memory unit 62, it performs processes such as arranging an object composed of primitives such as polygons, free-form surfaces, and two-dimensional images representing the object in a virtual three-dimensional space (virtual space), moving or acting it. Also, the display control unit 104 performs a process of controlling the position, orientation (line-of-sight direction), and angle of view (field of view) of a virtual camera (viewpoint) for generating an image visible from a given (arbitrary) viewpoint in the virtual three-dimensional space.
[0046] More specifically, the display control unit 104 includes a virtual space setting unit 120, an object control unit 122, a target setting unit 124, and a virtual camera control unit 126.
[0047] The virtual space setting unit 120 performs processing to arrange various objects composed of primitive surfaces such as polygons in a virtual three-dimensional space. Specifically, the object control unit 120 determines the position and orientation (rotation angle) of an object in the world coordinate system every frame (1 / 30 second) based on player input detected by the player input detection unit 50, received data received by the terminal communication unit 66, results of various processes performed by the terminal information processing unit 100, programs and data read into the main memory unit 62, etc., and arranges the object at the determined position (three-dimensional coordinates) in the determined orientation.
[0048] The object control unit 122 performs movement calculations and action calculations (movement or action simulations) on objects that move or act, such as the player's own character and enemy characters. Specifically, the object control unit 120 obtains movement information (position, rotation angle, speed, acceleration, etc.) and action information (position, rotation angle, speed, acceleration, etc. of each part constituting the object) of the object every frame based on player input detected by the player input detection unit 50, received data received by the terminal communication unit 66, results of various processes performed by the terminal information processing unit 100, movement algorithms, action algorithms, and motion data read into the main memory unit 62, etc., and performs processing to move the object in the virtual three-dimensional space or to move (animate) each of the plurality of parts constituting the object.
[0049] In particular, when the object is a character object, the object control unit 120 controls the operation of the character object based on the motion data associated with each character. Specifically, the motion data includes the positions and rotation angles (the rotation angles of the child bones relative to the parent bones) of the bones (part objects, joints, motion bones) that make up the skeleton of the character object. The object control unit 120 controls the attack actions, defense actions, movement actions, etc. of the character object by moving each bone that makes up the skeleton of the character object or deforming the skeleton shape based on the motion data.
[0050] The target setting unit 124 enables the enemy object to be set as a target in response to the player's input. When the player input detection unit 50 detects a target setting input, the target setting unit 124 detects enemy characters existing within a range corresponding to the position of the own character, and sets the most prioritized enemy character among the detected enemy characters as the target. Hereinafter, the enemy character set as the target may be referred to as the target character. The most prioritized enemy character can be, for example, the enemy character at the closest position from the own character. Also, for example, a target priority order is preset for each enemy character, and the enemy character with the highest target priority order within the range corresponding to the position of the own character can be determined as the most prioritized enemy character. The target setting unit 124 enables the enemy character serving as the target to be changed when the player input detection unit 50 detects a target change input.
[0051] The virtual camera control unit 126 performs processing to control a virtual camera (viewpoint) for generating an image visible from a given (arbitrary) viewpoint in the virtual three-dimensional space. Specifically, based on the player input detected by the player input detection unit 50, the received data received by the terminal communication unit 66, the results of various processes performed by the terminal information processing unit 100, the program and virtual camera control data read into the main memory unit 62, etc., every frame (1 / 30 second), the position, orientation (rotation angle), and field of view angle of the virtual camera in the world coordinate system are determined, and the virtual camera is arranged at the determined position with the determined orientation and field of view angle.
[0052] Here, for the orientation of the virtual camera, a fixation point, which is the point the virtual camera looks at, can be set in the virtual three-dimensional space, and the orientation of the virtual camera can be controlled to face the set fixation point. Also, the field of view angle of the virtual camera may be controlled by enlarging or reducing the field of view angle, or may be controlled by changing the distance between the screen (projection plane) on which the object is projected and the virtual camera. Note that an image for zooming in on the target object can be generated by narrowing the field of view angle of the virtual camera or increasing the distance between the screen and the virtual camera, and an image for zooming back from the target object can be generated by widening the field of view angle of the virtual camera or decreasing the distance between the screen and the virtual camera.
[0053] The virtual camera control unit 126 controls the position, orientation, and field of view angle of the virtual camera so that the virtual camera follows changes in the position and orientation of the self-character that moves and acts based on player input, and so that the position, orientation, and field of view angle of the virtual camera change based on player input.
[0054] The virtual camera control unit 126 controls the position, orientation, and field of view angle of the virtual camera so that the position of the virtual camera moves to a predetermined position, moves along a predetermined movement path, the orientation of the virtual camera rotates at a predetermined rotation angle, or the field of view angle of the virtual camera changes to a predetermined field of view angle, based on virtual camera control data for specifying the position (movement path), orientation, field of view angle, and fixation point of the virtual camera. The virtual camera control data may include the position, rotation angle, field of view angle, and position of the fixation point of the virtual camera for each frame, as well as the amount of change, rate of change, and change period (number of frames) of the position, rotation angle, field of view angle, and fixation point of the virtual camera for each frame.
[0055] When any enemy character is set as a target, the virtual camera control unit 126 controls at least one of the position and orientation of the virtual camera according to the distance from the self-character to the target character so that the self-character and the target character are displayed in a predetermined positional relationship in the image of the virtual 3D space viewed from the virtual camera. The position and orientation of the virtual camera are adjusted to pivot around the fixation point in the horizontal and vertical directions in the virtual 3D space. Note that both the position and orientation of the virtual camera may be changed, or only the position of the virtual camera may be changed without changing the orientation of the virtual camera, or only the orientation of the virtual camera may be changed without changing the position of the virtual camera.
[0056] When the distance from the self-character to the target character in the virtual 3D space is within a range from a first distance (e.g., 3 m) to a second distance (e.g., 20 m), the virtual camera control unit 126 controls at least one of the horizontal position and orientation of the virtual camera so that the target character is displayed closer to the reference axis, which is the vertical axis passing through the self-character, in the image of the virtual 3D space viewed from the virtual camera, the farther the target character is from the self-character.
[0057] When the distance from the self-character to the target character in the virtual three-dimensional space is equal to or less than a first distance (for example, 3 m or less), the virtual camera control unit 126 controls at least one of the horizontal position and orientation of the virtual camera so that the target character is displayed on an adjustment axis that forms a first angle (for example, 35 degrees) with respect to the reference axis in the image of the virtual three-dimensional space seen from the virtual camera.
[0058] When the distance from the self-character to the target character in the virtual three-dimensional space is equal to or greater than a second distance (for example, 20 m or greater), the virtual camera control unit 126 controls at least one of the horizontal position and orientation of the virtual camera so that the target character is displayed on an adjustment axis that forms a second angle (for example, 8 degrees), which is narrower than the first angle (for example, 35 degrees), with respect to the reference axis in the image of the virtual three-dimensional space seen from the virtual camera.
[0059] As described above, in this embodiment, according to the distance from the self-character to the target character in the virtual three-dimensional space, at least one of the horizontal position and orientation of the virtual camera is adjusted so that the target character is displayed at a position on an adjustment axis set within a range from a first angle (for example, 35 degrees) to a second angle (for example, 8 degrees) with respect to the reference axis, which is a vertical axis passing through the self-character, in the image of the virtual three-dimensional space.
[0060] When the distance from the self-character to the target character in the virtual three-dimensional space is within a range from the first distance (for example, 3 m) to the second distance (for example, 20 m), the virtual camera control unit 126 controls at least one of the vertical position and orientation of the virtual camera so that the position of the virtual camera in the virtual space becomes higher as the target character is farther from the self-character.
[0061] In this embodiment, when the distance from the self-character to the target character in the virtual three-dimensional space is within the range from a first distance (for example, 3 m) to a second distance (for example, 20 m), the position and orientation of the virtual camera are adjusted so that the self-character looks down at an angle within the range from a third angle (for example, 8 degrees) to a fourth angle (for example, 15 degrees) with respect to the horizontal plane including the fixation point in the virtual three-dimensional space.
[0062] When the distance from the self-character to the target character in the virtual three-dimensional space is equal to or greater than the second distance (for example, 20 m or more), the virtual camera control unit 126 controls at least one of the vertical position and orientation of the virtual camera according to the distance from the virtual camera to the self-character.
[0063] When the distance from the virtual camera to the self-character in the virtual three-dimensional space is within the range from a third distance (for example, 5 m) to a fourth distance (for example, 15 m), the virtual camera control unit 126 controls at least one of the vertical position and orientation of the virtual camera so that the position of the virtual camera in the virtual three-dimensional space becomes lower as the virtual camera is farther from the self-character.
[0064] In this embodiment, when the distance from the virtual camera to the self-character in the virtual three-dimensional space is within the range from a third distance (for example, 5 m) to a fourth distance (for example, 15 m), the position and orientation of the virtual camera are adjusted so that the self-character is looked down at in a line-of-sight direction forming an angle within the range from a fourth angle (for example, 15 degrees) to a fifth angle (for example, 10 degrees) with respect to the horizontal plane including the fixation point in the virtual three-dimensional space.
[0065] In this embodiment, when the distance from the virtual camera to the self-character in the virtual three-dimensional space is equal to or less than the third distance (for example, 5 m or less), the position and orientation of the virtual camera are adjusted so that the self-character is looked down at in a line-of-sight direction forming a fourth angle (for example, 15 degrees) with respect to the horizontal plane including the fixation point in the virtual three-dimensional space.
[0066] In this embodiment, when the distance from the virtual camera to the self-character in the virtual three-dimensional space is equal to or greater than a fourth distance (for example, 15 m or greater), the position and orientation of the virtual camera are adjusted so as to look down on the self-character in a line-of-sight direction forming a fifth angle (for example, 10 degrees) with respect to the horizontal plane including the fixation point in the virtual three-dimensional space.
[0067] When the distance from the self-character to the target character in the virtual three-dimensional space is equal to or less than a first distance (for example, 3 m or less), the virtual camera control unit 126 adjusts the position and orientation of the virtual camera so as to look down on the self-character in a line-of-sight direction forming a third angle (for example, 8 degrees) with respect to the horizontal plane including the fixation point in the virtual three-dimensional space.
[0068] Based on the player input detected by the player input detection unit 50, the received data received by the terminal communication unit 66, the results of various processes performed by the terminal information processing unit 100, particularly the results of various processes performed by the display control unit 104, and the programs and data read into the main storage unit 62, etc., the image generation unit 108 performs a process of drawing a game image in the drawing buffer 64 for each frame, thereby generating a game image in which various objects and various pre-rendered images are displayed, and outputs the generated game image to the display unit 52 to display the game image.
[0069] When generating a three-dimensional game image, based on the results of various processes of the display control unit 104, object data (model data) including vertex data (vertex position coordinates, texture coordinates, color data, normal vector, or α value, etc.) of each vertex of an object (model) is acquired, and vertex processing (shading by a vertex shader) is performed based on the vertex data included in the acquired object data.
[0070] In vertex processing, geometry processing such as vertex movement processing, coordinate transformation (world coordinate transformation, camera coordinate transformation), clipping processing, or perspective transformation is performed according to a vertex processing program (vertex shader program), and based on the processing results, the vertex data given for the vertex group constituting the object is changed (updated, adjusted).
[0071] When vertex processing is performed, rasterization (scan conversion) is performed based on the vertex data after vertex processing, and the faces of polygons (primitives) are associated with pixels (picture elements). When rasterization is performed, pixel processing (shading by a pixel shader, fragment processing) for drawing the pixels (fragments constituting the display screen) that make up the image is performed. In pixel processing, various processes such as texture mapping, hidden surface removal, setting / modifying color data, translucent composition, and anti-aliasing are performed according to a pixel processing program (pixel shader program) to determine the final drawing color of the pixels that make up the image, and the drawing color of the perspective-transformed object is output (drawn) to the drawing buffer 64 (a buffer that can store image information in pixel units, a rendering target). That is, in pixel processing, per-pixel processing for setting or modifying image information (color value, luminance value, Z value, normal vector, α value, etc.) in pixel units is performed. Thereby, an image visible from a virtual camera (a given viewpoint) in a virtual three-dimensional space is generated.
[0072] The sound generation unit 110 performs sound processing based on the results of various processes performed by the terminal information processing unit 100, generates game sounds such as music, BGM, sound effects, or voices, and outputs them to the sound output unit 54.
[0073] The terminal communication control unit 112 causes the terminal communication unit 66 to communicate with the server device 12 or another terminal device 14 and performs processes for transmitting and receiving various information. For example, the terminal communication control unit 112 causes the terminal communication unit 66 to transmit and receive information necessary for processes such as registering a player newly in the information processing system 10, logging in a player to the information processing system 10, setting an opponent player to cooperate or compete with the logged-in player, synchronizing a plurality of terminal devices 14, and performing processes necessary for executing a common game on the plurality of terminal devices 14. Further, the terminal communication control unit 112 also causes the terminal communication unit 66 to transmit and receive destination information indicating the destination of information, source information indicating the source of information, identification information for identifying the information processing system 10 that generated the information, and the like.
[0074] Note that all or part of the functions of the terminal information storage medium 56 of the terminal device 14, all or part of the functions of the terminal storage unit 60, all or part of the functions of the terminal communication unit 66, and all or part of the functions of the terminal information processing unit 100 may be provided in the server device 12, or all or part of the functions of the server information storage medium 20 of the server device 12, all or part of the functions of the server storage unit 30, all or part of the functions of the server communication unit 36, and all or part of the functions of the server information processing unit 40 may be provided in the terminal device 14.
[0075] 2. Control method of this embodiment Hereinafter, the control method of this embodiment will be described in detail by taking as an example the case where the terminal device 14 is a console video game machine and the game program of this embodiment is applied as a game application of the console video game machine.
[0076] FIG. 4 is a diagram showing an example of a virtual three-dimensional space in which a virtual camera and a plurality of objects are arranged. As shown in FIG. 4, in the virtual three-dimensional space, one self-character 200 and three enemy characters 201 to 203 are arranged. The virtual camera 210 is arranged behind the self-character 200, and its position and orientation are controlled so as to follow the movement and actions of the self-character 200. The game program of the present embodiment generates an image of the virtual three-dimensional space as seen from the virtual camera 210, and the generated image is displayed on the display unit 52 of the terminal device 14. In the present embodiment, for the sake of convenience of explanation, a case where the self-character 200 and the enemy characters 201 to 203 are arranged on the same plane where the world coordinates are (X, Y, 0) in the virtual three-dimensional space will be taken as an example for explanation.
[0077] FIG. 5 is a diagram showing a controller of a console video game machine. While viewing the image of the virtual three-dimensional space displayed on the display unit 52, the player uses the controller 300 to input an operation to move / operate the self-character 201, and enjoys a game of fighting against the enemy characters 201 to 203 that move / operate according to a given algorithm.
[0078] As shown in FIG. 5, the controller 300 is provided with a left analog stick 301, a right analog stick 302, a plurality of buttons 303, a direction pad 304, a left trigger switch 305, a right trigger switch 306, etc. The direction and amount by which the left analog stick 301 and the right analog stick 302 are tilted are detected by a variable resistance type sensor.
[0079] When an operation of tilting the left analog stick 301 is performed, it is detected as a movement input for moving the self-character 200, and the self-character 200 moves according to the direction and amount by which the left analog stick 301 is tilted. When an operation of tilting the right analog stick 302 is performed, it is detected as a virtual camera input for changing the orientation of the virtual camera 210, and the orientation of the virtual camera 210 changes according to the direction and amount by which the right analog stick 302 is tilted.
[0080] When an operation of pressing any of the buttons 303 or the direction pad 304 is performed, it is detected as an attack input for causing the character 200 to perform an attack action on the enemy characters 201 to 203, or an avoidance input for causing the character 200 to perform an avoidance action against the attacks of the enemy characters 201 to 203, according to the type of the pressed button 303 or the position of the pressed direction pad 304.
[0081] When an operation of pressing the left trigger switch 305 is performed, an enemy character existing within the target range centered on the character 200 can be set as the target character. When a target character is set, the character 200 is controlled to perform an attack action on the target character.
[0082] As shown in FIG. 6, an enemy character that exists within the target range with a radius r1 centered on the character 200 in the virtual three-dimensional space and is at the position closest to the character 200 is set as the target character. In the example shown in FIG. 6, for each of the distances d1 between the character 200 and the enemy character 201, the distance d2 between the character 200 and the enemy character 202, and the distance d3 between the character 200 and the enemy character 203, a comparison is made with the radius r1 that defines the target range, and it is determined that the enemy characters 202 and 203 located at a distance closer than the radius r1 exist within the target range. Among the enemy characters 202 and 203, the enemy character 202 is determined to be at the position closest to the character 200 and is set as the target character.
[0083] In a situation where a target character is set, as shown in FIG. 7, a target mark 204 is assigned to the enemy character 202 set for the target character. When an operation of pressing the left trigger switch 305 is performed when a target character is set, the setting of the target character can be canceled. When an operation of pressing the right trigger switch 306 is performed when a target character is set, the enemy character targeted by the target character can be changed.
[0084] The virtual camera 210 is basically arranged at a reference position at a predetermined distance behind the own character 200 and is controlled to observe the virtual three-dimensional space from the back side of the own character 200. When the own character 200 moves and the position and orientation of the own character 200 change, the position and orientation of the virtual camera 210 are controlled to follow the changes in the position and orientation of the own character 200.
[0085] For example, when a movement input is performed in a state where no virtual camera input, attack input, or avoidance input is being performed, and the position and orientation of the own character 200 change, the position and orientation of the virtual camera 210 are controlled so that the relationship between the position of the own character 200 and the position of the virtual camera 210 and the relationship between the orientation of the own character 200 and the orientation of the virtual camera 210 become a predetermined relationship.
[0086] In the virtual three-dimensional space, there may be a situation where it is difficult to visually recognize the target character depending on the positional relationship between the own character 200 and the target character, such as when the distance between the own character 200 and the target character is close.
[0087] Therefore, a method is adopted to adjust the position and orientation of the virtual camera 210 according to the distance from the own character 200 to the target character so that the own character 200 and the target character are displayed in a predetermined positional relationship in the image of the virtual three-dimensional space seen from the virtual camera 210.
[0088] FIG. 8 is a diagram showing the positional relationship among the self-character 200, the enemy characters 201 to 203, and the virtual camera 210 in a virtual three-dimensional space.
[0089] When the enemy character 202 among the enemy characters 201 to 203 is set as the target character, based on the distance Dt (= d2) from the self-character 200 to the target character, a horizontal direction adjustment process is performed to rotate the virtual camera 210 clockwise or counterclockwise around the self-character 200 in the horizontal direction of the virtual three-dimensional space. The virtual camera 210 is controlled so that its orientation is directed at the representative point of the self-character 200 as the fixation point. When the virtual camera 210 rotates by the horizontal direction adjustment process, the orientation of the virtual camera 210 is controlled so as to face the representative point of the self-character 200 at the position after rotation.
[0090] The horizontal rotation information of the virtual camera 210 is obtained so that the self-character 200 and the enemy character 202, which is the target character, are displayed in a predetermined positional relationship in the image of the virtual three-dimensional space viewed from the virtual camera 210.
[0091] First, as shown in FIG. 9(A), in the screen coordinate system, which is the coordinate system in the image of the virtual three-dimensional space viewed from the virtual camera 210, a reference axis 230 passing through the representative point 221 of the self-character 200 is set. The horizontal rotation information of the virtual camera 210 is obtained so that the representative point 222 of the enemy character 202, which is the target character, is located on the adjustment axis that is set within the ranges A1 and A2 of an angle of 8 degrees to 35 degrees with respect to the reference axis 230 and includes the adjustment reference point 220 set on the reference axis 230. The adjustment reference point 220 can be any point on the reference axis 230, and the representative point 221 of the self-character may also serve as the adjustment reference point 220. In the example shown in FIG. 9(A), the position corresponding to the lowest point of the self-character 200 on the reference axis 230 is set as the adjustment reference point 220.
[0092] As shown in FIG. 9(B), when the distance Dt is 3 m or less in the virtual three-dimensional space, the angle formed by the adjustment axis with respect to the reference axis 230 is set to 35 degrees, and when the distance Dt is 20 m or more in the virtual three-dimensional space, the angle formed by the adjustment axis with respect to the reference axis 230 is set to 8 degrees. When the distance Dt is in the range of 3 m to 20 m in the virtual three-dimensional space, an angle between 35 degrees and 8 degrees is obtained by linear interpolation according to the distance Dt, and the obtained angle is set as the angle formed by the adjustment axis with respect to the reference axis 230.
[0093] For example, when the distance Dt from the self-character 200 to the target character, the enemy character 202, is 3 m or less, as shown in FIG. 10, an adjustment axis 240 with an angle of 35 degrees with respect to the reference axis 230 is set, and the horizontal rotation information of the virtual camera 210 is obtained so that the representative point 222 of the enemy character 202 is located on the adjustment axis 240. When adjusting the horizontal position and orientation of the virtual camera 210 so that the representative point 222 of the enemy character 202 is located on the adjustment axis 240 shown in FIG. 10, as shown in FIG. 11, the horizontal rotation information is obtained so that the virtual camera 210 rotates clockwise.
[0094] Whether to set the adjustment axis 240 in either the range A1 or the range A2 can be determined by whether the representative point of the target character exists on the left or right with respect to the reference axis 230 in the screen coordinate system. When the representative point of the target character exists on the left with respect to the reference axis 230 in the screen coordinate system, the adjustment axis 240 is set in the range A1, and when the representative point of the target character exists on the right with respect to the reference axis 230 in the screen coordinate system, the adjustment axis 240 can be set in the range A2. In the situation shown in FIG. 9(A), since the representative point 222 of the enemy character 202, which is the target character, exists on the left with respect to the reference axis 230, the adjustment axis is set within the range A1.
[0095] After the target character is set, if the positional relationship between the own character 200 and the target character changes in the virtual three-dimensional space, the horizontal position and orientation of the virtual camera 210 are adjusted corresponding to the change in the positional relationship.
[0096] For example, assume a case where the enemy character 202, which is the target character, retreats in a direction away from the own character 200 in the virtual three-dimensional space. In this case, if the distance Dt from the own character 200 to the enemy character 202, which is the target character, becomes 3 m or more, for example, as shown in FIG. 12, the angle formed by the adjustment axis 240 with respect to the reference axis 230 is set to be less than 35 degrees, and the horizontal position and orientation of the virtual camera 210 are adjusted so that the enemy character 202, which is the target character, is displayed at a position closer to the reference axis 230 than before the retreat. Specifically, as shown in FIG. 13, rotation information is obtained so that the virtual camera 210 rotates counterclockwise due to the retreat of the enemy character 202 in a direction away from the own character 200. Thus, in the horizontal adjustment process, when the distance Dt between the own character 200 and the enemy character 202, which is the target character, is within the range of 3 m to 20 m, the horizontal position and orientation of the virtual camera 210 are controlled so that the display position of the enemy character 202 approaches the reference axis 230 as the distance from the own character 200 to the enemy character 202, which is the target character, becomes farther. Note that when the distance Dt reaches 20 m, the angle formed by the adjustment axis 240 with respect to the reference axis 230 is set to 8 degrees, and when the distance Dt is 20 m or more, the angle formed by the adjustment axis 240 with respect to the reference axis 230 does not become narrower than 8 degrees.
[0097] Thus, in the horizontal adjustment process, the closer the target character is to the own character 200, the more it is displayed at a position shifted left and right in the image of the virtual three-dimensional space viewed from the virtual camera 210, and as the target character moves farther from the own character 200, it is displayed at a position closer to the reference axis 230. Therefore, an image that makes it easy to view the target character can be generated.
[0098] In the horizontal adjustment process, while the self-character 200 is displayed at a predetermined position near the center of the screen, the target character can be displayed in an easy-to-see manner. Therefore, by adopting the horizontal adjustment process, it is possible to realize an image representation that simultaneously satisfies two points: making it easier for the player to visually recognize the movement of the self-character 200 and making it easier for the player to visually recognize the target character.
[0099] Also, when the positional relationship between the self-character 200 and the target character on the screen (the angle formed by the reference axis 230 and the adjustment axis 240) is fixed, the farther the distance from the self-character 200 to the target character, the more likely the target character will be displayed at a position either to the left or right of the self-character 200 on the screen, and there may be a problem that the player is likely to lose sight of the target character. However, in the horizontal adjustment process, the farther the distance from the self-character 200 to the target character, the narrower the angle formed by the reference axis 230 and the adjustment axis 240, and the target character is displayed closer to the center of the screen, so it is possible to prevent the player from losing sight of the target character.
[0100] When the virtual camera 210 moves within the virtual three-dimensional space following the self-character 200, it is controlled to maintain a certain distance from the self-character 200. However, when the self-character 200 performs an attack action against an enemy character, etc., the distance Dc from the virtual camera 210 to the self-character 200 may change. For example, when the self-character 200 performs an attack action of unleashing a special move against an enemy character, the virtual camera 210 is controlled to move away from the self-character 200. Also, depending on the size relationship between the self-character 200 and the target character, there may be a situation where, with only horizontal direction adjustment processing, the self-character 200 and the target character overlap, making the target character difficult to view. For example, in horizontal direction adjustment processing, since the adjustment axis 240 is set to approach the reference axis 230 as the target character gets closer to the self-character 200, when the self-character 200 is a large-sized object, there may be a situation where the target character, which is displayed small in the distance, overlaps with the self-character 200 and the target character is difficult to see.
[0101] Therefore, a method is adopted to adjust the vertical position and orientation of the virtual camera 210 according to the distance Dc from the virtual camera 210 to the self-character 200 and the distance Dt from the self-character 200 to the target character.
[0102] FIG. 14(A) is a diagram showing the vertical inclination of the virtual camera 210 according to the distance Dc from the virtual camera 210 to the self-character 200. As shown in FIG. 14(A), when the distance Dc from the virtual camera 210 to the self-character 200 is far, the virtual camera 210 is controlled so that the angle at which the virtual camera 210 looks down on the self-character 200 is shallower than when the distance Dc from the virtual camera 210 to the self-character 200 is near. That is, the closer the virtual camera 210 is to the self-character 200, the deeper the angle at which the virtual camera 210 looks down on the self-character 200 is controlled. The vertical inclination of the virtual camera 210 is set by the angle formed by the line-of-sight direction of the virtual camera 210 with respect to the horizontal plane including the fixation point (for example, the representative point 221 of the self-character 200). The larger the angle formed by the line-of-sight direction of the virtual camera 210 with respect to the horizontal plane including the fixation point, the higher the position of the virtual camera 210 in the virtual three-dimensional space, and the smaller the angle formed by the line-of-sight direction of the virtual camera 210 with respect to the horizontal plane including the fixation point, the lower the position of the virtual camera 210 in the virtual three-dimensional space.
[0103] As shown in FIG. 14(B), when the distance Dc is 5 m or less in the virtual three-dimensional space, the angle formed by the line-of-sight direction of the virtual camera 210 with respect to the horizontal plane including the fixation point is set to 15 degrees, and when the distance Dc is 15 m or more in the virtual three-dimensional space, the angle formed by the line-of-sight direction of the virtual camera 210 with respect to the horizontal plane including the fixation point is set to 10 degrees. When the distance Dc is in the range of 5 m to 15 m in the virtual three-dimensional space, an angle between 15 degrees and 10 degrees is obtained by linear interpolation according to the distance Dc, and the obtained angle is set as the angle formed by the line-of-sight direction of the virtual camera 210 with respect to the horizontal plane including the fixation point.
[0104] Figs. 15(A) and 15(B) are diagrams showing the degree of vertical inclination of the virtual camera 210 according to the distance Dt from the self-character 200 to the target character (in this example, the enemy character 202). As shown in Fig. 15(A), when the distance Dt from the self-character 200 to the target character (enemy character 202) is short, as shown in Fig. 15(B), the virtual camera 210 is controlled so that the angle at which it looks down on the self-character 200 is shallower than when the distance Dt from the self-character 200 to the target character (enemy character 202) is short. That is, the virtual camera 210 is controlled so that the angle at which it looks down on the self-character 200 becomes deeper as the target character moves farther away from the self-character 200.
[0105] As shown in Fig. 15(C), when the distance Dt is 3 m or less in the virtual three-dimensional space, the angle formed by the line-of-sight direction of the virtual camera 210 with respect to the horizontal plane including the fixation point is set to 8 degrees. When the distance Dt is 20 m or more in the virtual three-dimensional space, as shown in Fig. 14(B), the angle formed by the line-of-sight direction of the virtual camera 210 with respect to the horizontal plane including the fixation point is set in the range of 10 degrees to 15 degrees according to the distance Dc from the virtual camera 210 to the self-character 200. When the distance Dt is in the range of 3 m to 20 m in the virtual three-dimensional space, the angle between 8 degrees and the angle obtained according to the distance Dc (an angle within the range of 10 degrees to 15 degrees: see Fig. 14(B)) is obtained by linear interpolation according to the distance Dt, and the obtained angle is set as the angle formed by the line-of-sight direction of the virtual camera 210 with respect to the horizontal plane including the fixation point.
[0106] In this way, in the vertical adjustment process, when the target character is close to the self-character 200, since it is displayed at a position shifted left and right by the horizontal adjustment process, an image with a high sense of presence in a close combat can be generated by making the angle at which the virtual camera 210 looks down on the self-character 200 shallower. Also, in the vertical adjustment process, when the target character is far from the self-character 200, the target character will be displayed small in the image. Therefore, by making the angle at which the virtual camera 210 looks down on the self-character 200 deeper as the virtual camera 210 is closer to the self-character 200, the inconvenience that the self-character 200 and the target character overlap and are difficult to see can be resolved.
[0107] Also, in the above-described horizontal adjustment process, as the distance from the self-character 200 to the target character becomes longer, the angle formed by the reference axis 230 and the adjustment axis 240 becomes narrower, so the target character will be displayed closer to the vicinity of the center of the screen. Therefore, by adjusting the position of the virtual camera 210 to be higher using the vertical adjustment process, the target character can be displayed in a positional relationship that does not overlap with the self-character 200.
[0108] In this way, by using the horizontal adjustment process and the vertical adjustment process in combination, the vertical and horizontal positions and orientations of the virtual camera 210 can be dynamically adjusted according to the distance from the self-character 200 to the target character and the distance from the virtual camera 210 to the self-character 200.
[0109] Hereinafter, the flow of the process performed by the terminal information processing unit 100 of the terminal device 14 of the present embodiment will be described using the flowcharts of FIGS. 16 to 18. The processes shown in FIGS. 16 to 18 are mainly performed by the virtual camera control unit 126.
[0110] As shown in FIG. 16, based on the arrival of the frame update timing (Y in step S101), it is checked whether a target character is set (step S102). The frame update timing is the timing at which the image viewed from the virtual camera 210 of the virtual three-dimensional space is updated. When the frame rate is 60 fps, the frame update timing arrives every 1 / 60 second, and when the frame rate is 30 fps, the frame update timing arrives every 1 / 30 second.
[0111] When a target character is set (Y in step S102), a horizontal direction adjustment process (step S103) and a vertical direction adjustment process (step S104) are executed to adjust the position and orientation of the virtual camera 210. It is preferable that the horizontal direction adjustment process and the vertical direction adjustment process are performed within the same frame. The vertical direction adjustment process may be performed after the horizontal direction adjustment process, or the horizontal direction adjustment process may be performed after the vertical direction process.
[0112] FIG. 17 is a flowchart showing details of the horizontal direction adjustment process.
[0113] First, the distance Dt from the self-character 200 to the target character is obtained (step S201), and it is determined whether the distance Dt is 3 m or less or 20 m or more (steps S202 and S204).
[0114] When it is determined that the distance Dt is 3 m or less (Y in step S202), the angle formed by the adjustment axis 240 for adjusting the display position of the target character in the screen coordinate system with respect to the reference axis 230 is set to 35 degrees (step S203). When it is determined that the distance Dt is 20 m or more (Y in step S204), the angle formed by the adjustment axis 240 for adjusting the display position of the target character in the screen coordinate system with respect to the reference axis 230 is set to 8 degrees (step S205). When it is determined that the distance Dt is neither 3 m or less nor 20 m or more (N in step S202, N in step S204), that is, when the distance Dt is within the range of 3 m to 20 m, 35 degrees and 8 degrees are linearly interpolated according to the distance Dt to obtain the angle formed by the adjustment axis 240 with respect to the reference axis 230 (step S206).
[0115] When the angle formed by the adjustment axis 240 with respect to the reference axis 230 is set in step S203, step S205, or step S206, horizontal rotation information for displaying the target character on the adjustment axis 240 is obtained (step S207). Then, based on the obtained horizontal rotation information, the virtual camera 210 is rotated about the fixation point in the horizontal direction of the virtual three-dimensional space so that the representative point of the target character is located on the adjustment axis 240, and the position and orientation of the virtual camera 210 are adjusted (step S208).
[0116] FIG. 18 is a flowchart showing details of the vertical direction adjustment process.
[0117] First, in the vertical direction adjustment process, a provisional angle is set according to the distance Dc from the virtual camera 210 to the own character 200 (steps S301 to S306).
[0118] Specifically, the distance Dc from the virtual camera 210 to the own character 200 is acquired (step S301), and it is determined whether the distance Dc is 5 m or less or 15 m or more (steps S302, S304).
[0119] When it is determined that the distance Dc is 5 m or less (Y in step S302), the temporary angle is set to 15 degrees (step S303). When it is determined that the distance Dc is 15 m or more (Y in step S304), the temporary angle is set to 10 degrees (step S305). When it is determined that the distance Dc is neither 5 m or less nor 15 m or more (N in step S302, N in step S304), that is, when the distance Dc is in the range of 5 m to 15 m, the temporary angle is obtained by linearly interpolating between 15 degrees and 10 degrees according to the distance Dc (step S306).
[0120] Subsequently, processing is performed according to the distance Dt from the self-character 200 to the target character (steps S307 to S313).
[0121] Specifically, the distance Dt from the self-character 200 to the target character is acquired (step S307), and it is determined whether the distance Dt is either 3 m or less or 20 m or more (steps S308, S310).
[0122] When it is determined that the distance Dt is 3 m or less (Y in step S308), the angle of the line-of-sight direction of the virtual camera 210 with respect to the horizontal plane including the fixation point (hereinafter abbreviated as the tilt angle) is set to 8 degrees, and the vertical rotation information is obtained (step S309). When it is determined that the distance Dt is 20 m or more (Y in step S310), the vertical rotation information is obtained using the temporary angle set according to the distance Dc as the tilt angle (step S311). When it is determined that the distance Dt is neither 3 m or less nor 20 m or more (N in step S308, N in step S310), that is, when the distance Dt is in the range of 3 m to 20 m, the tilt angle is obtained by linearly interpolating between the temporary angle and 8 degrees according to the distance Dt, and the vertical rotation information is obtained based on the obtained tilt angle (step S312).
[0123] Then, based on the obtained vertical rotation information, in the vertical direction of the virtual three-dimensional space, the virtual camera 210 is rotated around the fixation point so that the line-of-sight direction of the virtual camera 210 forms an inclination angle with respect to the horizontal plane including the fixation point, and the position and orientation of the virtual camera 210 are adjusted (step S313).
[0124] In the control method of the present embodiment described above, it is possible to display the self-character 200 that is the tracking target of the virtual camera 210 and the enemy character 202 set as the target character in an appropriate positional relationship, and it is possible to generate an image with improved visibility of the object arranged in the virtual three-dimensional space.
[0125] The self-character 200 may be configured to perform an attack action of a special attack (ultimate move, special skill) on the target character. The player can select a character to be the self-character 200 from a plurality of characters, and can set a unique special attack action for each character. Regarding the special attack of each character, control information such as the position, orientation, and field of view angle of the virtual camera 210 during the execution of the attack action is set. When the self-character 200 performs a special attack action, the position and orientation of the virtual camera 210 can be controlled by giving priority to the control information for the special attack.
[0126] The control of the virtual camera 210 when the self-character 200 performs a special attack can be, for example, controlling the position, orientation, and field of view angle of the virtual camera 210 so as to generate a front image of the self-character 200, and then controlling the position, orientation, and field of view angle of the virtual camera 210 so as to generate an image in which the self-character 200 and the target character are within the field of view angle, and finally controlling the position, orientation, and field of view angle of the virtual camera 210 so as to generate an image in which the target character is displayed overlapping on the back side of the self-character 200.
[0127] During the execution of the attack action of the special attack, while maintaining the target setting information (for example, information on the character to be targeted, information on the display of the target mark 204, etc.), regarding the control of the virtual camera 210, the use of the control information of the virtual camera 210 for special attacks is prioritized. With the completion of the attack action of the special attack, as described in the above embodiment, it is possible to return to the control of the virtual camera 210 based on the positional relationship between the self-character 200 and the target character.
[0128] In this embodiment, the distance Dt from the self-character 200 to the target character is the distance between the representative points of each character in the world coordinate system, but it may also be the distance in the depth direction (difference in Z values) of the viewpoint coordinate system.
[0129] Also, in this embodiment, as a process of adjusting the position and orientation of the virtual camera according to the distance Dt from the self-character 200 to the target character, a configuration that executes a horizontal direction adjustment process and a vertical direction adjustment process is used. However, a configuration that only performs the horizontal direction adjustment process according to the distance Dt may be used, or a configuration that only performs the vertical direction adjustment process may be used.
[0130] In this embodiment, an example of generating an image of a third-person perspective in which the virtual camera 210 observes the self-character 200 from behind in the virtual three-dimensional space is given. However, it may also be applied to the case of generating an image of a first-person perspective in which the viewpoint of the virtual camera 210 is set within the self-character 200.
[0131] In this embodiment, an example of applying the present invention to a solo player action game has been described. However, the present invention may also be applied to a multiplayer battle game. In this case, the enemy character may be made operable by other players.
[0132] In this embodiment, an example of applying the present invention to an action game has been described. However, the present invention may be applied to various third-person perspective games such as sports games like soccer and basketball, fighting games, and racing games.
[0133] In this embodiment, an example of applying the present invention to a game application of a console video game machine has been described. However, the present invention may be applied to a smartphone (information processing device) or an arcade game device (information processing device) installed in a store. And when applying the present invention to a smartphone or an arcade game device, the terminal device may be a smartphone or an arcade game device, and a plurality of terminal devices may communicate with the server device. In this case, the present invention can be applied to the terminal device or the server device. Further, the present invention may be applied to a stand-alone game device not connected to the server device 12.
Explanation of Reference Numerals
[0134] 10 Information processing system, 12 Server device, 14 Terminal device, 16 Network, 20 Server information storage medium, 30 Server storage unit, 36 Server communication unit, 40 Server information processing unit, 42 Server game processing unit, 48 Server communication control unit, 50 Player input detection unit, 52 Display unit, 54 Sound output unit, 56 Terminal information storage medium, 60 Terminal storage unit, 62 Main storage unit, 64 Drawing buffer, 66 Terminal communication unit, 100 Terminal information processing unit, 102 Terminal game processing unit, 103 Input reception unit, 104 Display control unit, 108 Image generation unit, 110 Sound generation unit, 112 Terminal communication control unit 120 Virtual space setting unit, 122 Object control unit, 124 Target setting unit, 126 Virtual camera control unit
Claims
1. A program for generating an image of a virtual space seen by a virtual camera, a virtual space setting unit that sets the virtual space in which a first object and a second object are arranged; a virtual camera control unit that controls a position and a direction of the virtual camera that follows the first object; causing a computer to function as a target setting unit that can set the second object as a target in response to an input from a player; The virtual camera control unit, when the second object is set as a target, at least one of a position and a direction of the virtual camera is controlled in accordance with a distance from the first object to the second object so that the first object and the second object are displayed in a predetermined positional relationship in an image of the virtual space seen from the virtual camera; A program that controls at least one of the horizontal position and orientation of the virtual camera so that, when the distance from the first object to the second object in the virtual space is within a range from a first distance to a second distance farther than the first distance, the farther the second object is from the first object, the closer the second object is to a position on a vertical axis passing through the first object in an image of the virtual space seen from the virtual camera.
2. In claim 1, The virtual camera control unit, A program that controls at least one of the horizontal position and orientation of the virtual camera so that, when the distance from the first object to the second object in the virtual space is equal to or less than the first distance, the second object is displayed on an axis that forms a first angle with a vertical axis passing through the first object in an image of the virtual space seen from the virtual camera.
3. In claim 2, The virtual camera control unit, A program that controls at least one of the horizontal position and orientation of the virtual camera so that, when the distance from the first object to the second object in the virtual space is equal to or greater than the second distance, the second object is displayed on an axis that forms a second angle narrower than the first angle with respect to a vertical axis passing through the first object in an image of the virtual space seen from the virtual camera.
4. In any one of claims 1 to 3, The virtual camera control unit, A program for controlling at least one of the vertical position and orientation of the virtual camera so that, when the distance from the first object to the second object in the virtual space is within a range from the first distance to the second distance, the farther the second object is from the first object, the higher the position of the virtual camera in the virtual space.
5. In any one of claims 1 to 3, The virtual camera control unit, A program for controlling at least one of the vertical position and orientation of the virtual camera in accordance with the distance from the virtual camera to the first object when the distance from the first object to the second object in the virtual space is equal to or greater than the second distance.
6. In claim 4, The virtual camera control unit, A program that controls at least one of the vertical position and orientation of the virtual camera so that, when the distance from the virtual camera to the first object in the virtual space is within a range from a third distance to a fourth distance that is farther than the third distance, the position of the virtual camera in the virtual space becomes lower the farther the virtual camera is from the first object.
7. In claim 5, The virtual camera control unit, A program that controls at least one of the vertical position and orientation of the virtual camera so that, when the distance from the virtual camera to the first object in the virtual space is within a range from a third distance to a fourth distance that is farther than the third distance, the position of the virtual camera in the virtual space becomes lower the farther the virtual camera is from the first object.
8. An information processing device for generating an image of a virtual space viewed from a virtual camera, a virtual space setting unit that sets the virtual space in which a first object and a second object are arranged; a virtual camera control unit that controls a position and a direction of the virtual camera that follows the first object; a target setting unit that can set the second object as a target in response to an input from a player, The virtual camera control unit, when the second object is set as a target, at least one of a position and a direction of the virtual camera is controlled in accordance with a distance from the first object to the second object so that the first object and the second object are displayed in a predetermined positional relationship in an image of the virtual space seen from the virtual camera; An information processing device that controls at least one of the horizontal position and orientation of the virtual camera so that, when the distance from the first object to the second object in the virtual space is within a range from a first distance to a second distance farther than the first distance, the farther the second object is from the first object, the closer the second object is to a position on a vertical axis passing through the first object in an image of the virtual space viewed from the virtual camera.
9. An information processing system for generating an image of a virtual space viewed from a virtual camera, comprising: a virtual space setting unit that sets the virtual space in which a first object and a second object are arranged; a virtual camera control unit that controls a position and a direction of the virtual camera that follows the first object; a target setting unit that can set the second object as a target in response to an input from a player, The virtual camera control unit, when the second object is set as a target, at least one of a position and a direction of the virtual camera is controlled in accordance with a distance from the first object to the second object so that the first object and the second object are displayed in a predetermined positional relationship in an image of the virtual space seen from the virtual camera; An information processing system that controls at least one of the horizontal position and orientation of the virtual camera so that, when the distance from the first object to the second object in the virtual space is within a range from a first distance to a second distance farther than the first distance, the farther the second object is from the first object, the closer the second object is to a position on a vertical axis passing through the first object in an image of the virtual space viewed from the virtual camera.
10. 1. An information processing method for generating an image of a virtual space viewed from a virtual camera, comprising: a virtual space setting step of setting the virtual space in which a first object and a second object are arranged; a virtual camera control step of controlling a position and an orientation of the virtual camera to follow the first object; a target setting step of setting the second object as a target in response to an input from a player; In the virtual camera control step, when the second object is set as a target, at least one of a position and a direction of the virtual camera is controlled in accordance with a distance from the first object to the second object so that the first object and the second object are displayed in a predetermined positional relationship in an image of the virtual space seen from the virtual camera; An information processing method that controls at least one of the horizontal position and orientation of the virtual camera so that, when the distance from the first object to the second object in the virtual space is within a range from a first distance to a second distance farther than the first distance, the farther the second object is from the first object, the closer the second object is to a position on a vertical axis passing through the first object in an image of the virtual space seen from the virtual camera.
Citation Information
Patent Citations
Information storage medium and image generator
JP1999007543A
Game system, computer-readable recording medium in which program for game is stored and image displaying method
JP2001269482A
Image processing program and image processor
JP2015026172A
Program, information processing device and information processing method
JP2023050529A
Split cover securing apparatus
JP1985084411A