Systems and methods for improved collision detection in video games
12440763 ยท 2025-10-14
Assignee
Inventors
Cpc classification
A63F2300/643
HUMAN NECESSITIES
A63F2300/64
HUMAN NECESSITIES
International classification
Abstract
The patent discloses improved methods and systems for detecting a collision between a player controlled virtual character in a video game and an object positioned on a surface in a virtual environment of the video game. Two geometric models are defined, one of which is preferably a cylinder and the other of which is preferably a capsule. For a frame of the video game, data indicative of a position, velocity and direction of the virtual character is acquired and, in a subsequent frame, data indicative of another position of the virtual character is acquired. The first geometric model is moved vertically downward by a predefined distance to identify a level of the ground surface and the second geometric model is moved horizontally forward to detect a collision of the virtual character with the object.
Claims
1. A method of detecting a ground level relative to a virtual character in a virtual environment of a video game, the method being implemented by at least one server executing a plurality of programmatic instructions and comprising: defining a first geometric model, wherein the first geometric model has a first shape and first size and wherein the first geometric model at least partially bounds the virtual character; moving the first geometric model vertically, from a first position to a second position, by a predefined first distance; determining a first image obtained by projecting the first geometric model, in the second position, onto an axis of a world coordinate system defining said virtual environment; determining a second image obtained by projecting the ground level onto said axis of the world coordinate system; determining if a first condition is fulfilled, wherein the first condition is indicative of an overlap or intersection between the first image projection and second image projections; and determining at least one of an adjusted position, an adjusted direction or adjusted velocity of the virtual character if the overlap or intersection with the ground level is detected.
2. The method of claim 1, wherein the axis is a Z-axis of the world coordinate system.
3. The method of claim 1, further comprising determining a third image obtained by projecting the first geometric model, in the second position, onto a plane of the world coordinate system.
4. The method of claim 3, further comprising determining a fourth image obtained by projecting the ground level said plane.
5. The method of claim 4, further comprising determining if a second condition is fulfilled, wherein the second condition is indicative of an overlap or intersection between the third and fourth image projections.
6. The method of claim 5, wherein the plane is an XY plane of the world coordinate system.
7. The method of claim 5, further comprising determining that there exists a potential collision of the virtual character with the ground level only if both the first condition and second condition are fulfilled.
8. The method of claim 1, wherein the first shape is that of a cylinder and the first size is characterized by a first center line containing a center of mass of the cylinder and a first radius.
9. The method of claim 1, wherein the second position is determined by predicting a path of the virtual character from the first position to the second position based on a direction and velocity of the virtual character.
10. The method of claim 1, wherein the ground level detection is performed periodically at a rate equal to a frame rate of display of the virtual environment.
11. A system for detecting a solid surface level relative to a virtual character in a virtual environment of a video game, the system comprising at least one server executing a plurality of programmatic instructions, wherein said programmatic instructions: define a first geometric model, wherein the first geometric model has a first shape and first size and wherein the first geometric model at least partially bounds the virtual character; move the first geometric model vertically, from a first position to a second position, by a predefined first distance; determine a first image obtained by projecting the first geometric model, in the second position, onto an axis of a world coordinate system defining said virtual environment; determine a second image obtained by projecting the solid surface level onto said axis of the world coordinate system; determine if a first condition is fulfilled, wherein the first condition is indicative of an overlap or intersection between the first image projection and second image projections; and determine at least one of an adjusted position, an adjusted direction or adjusted velocity of the virtual character if the overlap or intersection with the solid surface level is detected.
12. The system of claim 11, wherein the axis is a Z-axis of the world coordinate system.
13. The system of claim 11, wherein said programmatic instructions further determine a third image obtained by projecting the first geometric model, in the second position, onto a plane of the world coordinate system.
14. The system of claim 13, wherein said programmatic instructions further determine a fourth image obtained by projecting the ground level onto said plane.
15. The system of claim 14, wherein said programmatic instructions further determine if a second condition is fulfilled, wherein the second condition is indicative of an overlap or intersection between the third and fourth image projections.
16. The system of claim 15, wherein the plane is an XY plane of the world coordinate system.
17. The system of claim 15, wherein said programmatic instructions further determine that there exists a potential collision of the virtual character with the solid surface level only if both the first condition and second condition are fulfilled.
18. The system of claim 11, wherein the first shape is that of a cylinder and the first size is characterized by a first center line containing a center of mass of the cylinder and a first radius.
19. The system of claim 11, wherein the second position is determined by predicting a path of the virtual character from the first position to the second position based on a direction and velocity of the virtual character.
20. The system of claim 11, wherein the solid surface level detection is performed periodically at a rate equal to a frame rate of display of the virtual environment.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) These and other features and advantages of the present specification will be appreciated, as they become better understood by reference to the following detailed description when considered in connection with the accompanying drawings, wherein:
(2)
(3)
(4)
(5)
(6)
(7)
DETAILED DESCRIPTION
(8) The present specification is directed towards multiple embodiments. The following disclosure is provided in order to enable a person having ordinary skill in the art to practice the invention. Language used in this specification should not be interpreted as a general disavowal of any one specific embodiment or used to limit the claims beyond the meaning of the terms used therein. The general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the invention. Also, the terminology and phraseology used is for the purpose of describing exemplary embodiments and should not be considered limiting. Thus, the present invention is to be accorded the widest scope encompassing numerous alternatives, modifications and equivalents consistent with the principles and features disclosed. For purpose of clarity, details relating to technical material that is known in the technical fields related to the invention have not been described in detail so as not to unnecessarily obscure the present invention.
(9) The term a multi-player online gaming environment or massively multiplayer online game may be construed to mean a specific hardware architecture in which one or more servers electronically communicate with, and concurrently support game interactions with, a plurality of client devices, thereby enabling each of the client devices to simultaneously play in the same instance of the same game. Preferably the plurality of client devices number in the dozens, preferably hundreds, preferably thousands. In one embodiment, the number of concurrently supported client devices ranges from 10 to 5,000,000 and every whole number increment or range therein. Accordingly, a multi-player gaming environment or massively multi-player online game is a computer-related technology, a non-generic technological environment, and should not be abstractly considered a generic method of organizing human activity divorced from its specific technology environment.
(10) In various embodiments, a computing device includes an input/output controller, at least one communications interface and system memory. The system memory includes at least one random access memory (RAM) and at least one read-only memory (ROM). These elements are in communication with a central processing unit (CPU) to enable operation of the computing device. In various embodiments, the computing device may be a conventional standalone computer or alternatively, the functions of the computing device may be distributed across multiple computer systems and architectures.
(11) In some embodiments, execution of a plurality of sequences of programmatic instructions or code enable or cause the CPU of the computing device to perform various functions and processes. In alternate embodiments, hard-wired circuitry may be used in place of, or in combination with, software instructions for implementation of the processes of systems and methods described in this application. Thus, the systems and methods described are not limited to any specific combination of hardware and software.
(12) The term module, application or engine used in this disclosure may refer to computer logic utilized to provide a desired functionality, service or operation by programming or controlling a general purpose processor. Stated differently, in some embodiments, a module, application or engine implements a plurality of instructions or programmatic code to cause a general purpose processor to perform one or more functions. In various embodiments, a module, application or engine can be implemented in hardware, firmware, software or any combination thereof. The module, application or engine may be interchangeably used with unit, logic, logical block, component, or circuit, for example. The module, application or engine may be the minimum unit, or part thereof, which performs one or more particular functions.
(13) The term swept volume used in this disclosure may refer to a virtual volume generated by sweeping a solid or a collection of surfaces in game space along a path or trajectory.
(14) In the description and claims of the application, each of the words comprise include and have, and forms thereof, are not necessarily limited to members in a list with which the words may be associated. It should be noted herein that any feature or component described in association with a specific embodiment may be used and implemented with any other embodiment unless clearly indicated otherwise.
(15) As used herein, the indefinite articles a and an mean at least one or one or more unless the context clearly dictates otherwise.
(16) Gaming Environment
(17)
(18) The one or more game servers 105 can be any computing device having one or more processors and one or more computer-readable storage media such as RAM, hard disk or any other optical or magnetic media. The one or more game servers 105 include a plurality of modules operating to provide or implement a plurality of functional, operational or service-oriented methods of the present specification. In some embodiments, the one or more game servers 105 include or are in communication with at least one database system 120. The database system 120 stores a plurality of game data associated with at least one game that is served or provided to the client devices 110 over the network 115. In some embodiments, the one or more game servers 105 may be implemented by a cloud of computing platforms operating together as game servers 105.
(19) In accordance with aspects of the present specification, the one or more game servers 105 provide or implement a plurality of modules or engines such as, but not limited to, a master game module 130 and a collision detection simulation module 132. The one or more client devices 110 are configured to implement or execute one or more of a plurality of client-side modules some of which are same as or similar to the modules of the one or more game servers 105. In some embodiments each of the player and non-player client devices 110 executes a client-side game module 130 (also referred to asclient game module 130) that may further integrate a client-side collision detection simulation module 132. In some embodiments, however, the client-side collision detection simulation module 132 may not be required and all simulation processes related to the collision detection functionality may be implemented at the one or more game servers 105.
(20) In some embodiments, the at least one non-player client device 110g is used by a computer graphics artist or designer to log into the one or more game servers 105 (via the client game module 130) and execute the module 132 on the server to generate one or more GUIs that enable the computer graphics artist or designer to customize and set one or more parameters, attributes or characteristics related to a composite model defined to represent a player controlled avatar or virtual character.
(21) While various aspects of the present specification are being described with reference to functionalities or programming distributed across modules or engines 130 and 132, it should be appreciated that, in some embodiments, some or all of the functionalities or programming associated with these modules or engines may be integrated within fewer modules or in a single modulesuch as, for example, in the master game module 130 itself on the server side.
(22) In embodiments, the master game module 130 is configured to execute an instance of an online game to facilitate interaction of the players with the game. In embodiments, the instance of the game executed may be synchronous, asynchronous, and/or semi-synchronous. The master game module 130 controls aspects of the game for all players and receives and processes each player's input in the game. In other words, the master game module 130 hosts the online game for all players, receives game data from the client devices 110 and transmits updates to all client devices 110 based on the received game data so that the game, on each of the client devices 110, represents the most updated or current status with reference to interactions of all players with the game. Thus, the master game module 130 transmits game data over the network 115 to the client devices 110 for use and rendering by the game module 130 to provide local versions and current status of the game to the players.
(23) On the client-side, each of the one or more player client devices 110 implements the game module 130 that operates as a gaming application to provide a player with an interface between the player and the game. The game module 130 generates the interface to render a virtual environment, virtual space, game space, map or virtual world associated with the game and enables the player to interact in the virtual environment to perform a plurality of game and other tasks and objectives. The game module 130 accesses at least a portion of game data, received from the game server 105, to provide an accurate representation of the game to the player. The game module 130 captures and processes player inputs and interactions within the virtual world or environment and provides at least a portion as updates to the game server 110 over the network 115.
(24) The database system 120 described herein may be, include, or interface to, for example, an Oracle relational database sold commercially by Oracle Corporation. Other databases, such as Informix, DB2 (Database 2) or other data storage, including file-based, or query formats, platforms, or resources such as OLAP (On Line Analytical Processing), SQL (Structured Query Language), a SAN (storage area network), Microsoft Access or others may also be used, incorporated, or accessed. The database system 120 may comprise one or more such databases that reside in one or more physical devices and in one or more physical locations.
(25) While the embodiments of the present specification will be illustrated with reference to the multi-player online gaming or massively multiplayer online gaming system/environment 100 of
(26) The graphics system 160 may perform rendering operations based on the results of the simulation operations performed by the collision detection simulation module 132. The rendering operations, performed by graphics system 160, may include visibility, culling and tessellation operations, for example. Based on results of the rendering operations, commands (such as Open GL commands) may be issued by graphics system 160 to the graphics hardware 152 to cause a display of a rendered frame on display 150.
(27) Collision Detection Simulation Module
(28) In accordance with some aspects of present specification, the collision detection simulation module 132 implements a plurality of instructions or programmatic code to define and generate, during run-time, a virtual composite model representative of a player controlled avatar or virtual character. While the embodiments of the present specification have been described with reference to a player controlled avatar or virtual character, it should be appreciated that this is in no way limiting and that the systems and method of the present specification may be equally implemented for a player controlled virtual object.
(29) As shown in
(30) The avatar or virtual character 220 is shown standing upright, for example, on a ground 225 (assuming that the ground level 225 is already known) such that a central longitudinal axis 222 of the avatar or virtual character 220 is parallel to the z-axis of a world coordinate system 230 while the ground 225 is parallel to the x-y plane defined in the world coordinate system 230.
(31) In some embodiments, the first geometric primitive or model 205 is a cylinder that at least partially bounds and approximately represents the avatar or virtual character 220. In embodiments, the first size of the cylinder 205 is defined by the following parameters: a) a center line icy (containing the center of mass of the cylinder m.sub.cy) and b) a radius r.sub.cy such that the center line icy is coaxial with the central longitudinal axis 222 of the avatar or virtual character 220. In some embodiments, the first size (in terms of the center line l.sub.cy and the radius r.sub.cy) of the cylinder 205 is defined such that the cylinder 205 bounds at least a portion of the avatar or virtual character 220. In an embodiment, the first size (in terms of the center line l.sub.cy and the radius r.sub.cy) of the cylinder 205 is defined such that the cylinder 205 bounds an entirety of the avatar or virtual character 220.
(32) In some embodiments, the second geometric primitive or model 210 is a capsule (also known as a sphero-cylinder) having a cylindrical body 211 with semi-spherical/hemispherical first and second ends or caps 212, 213. In embodiments, the second size of the capsule 210 is defined by the following parameters: a) a center line l.sub.cap (containing the center of mass of the capsule m.sub.cap) and b) a radius r.sub.cap such that the center line l.sub.cap is coaxial with the central longitudinal axis 222 of the avatar or virtual character 220.
(33) In some embodiments, l.sub.cy>l.sub.cap and r.sub.cy>r.sub.cap meaning that the first size of the cylinder 205 is larger than the second size of the capsule 210 so that the capsule 210 is bounded or encompassed within the larger cylinder 205. That is, the second size (in terms of the center line l.sub.cap and the radius r.sub.cap) of the capsule 210 is defined such that the capsule 210 is bounded or encompassed by the cylinder 205. In some embodiments, the second size (in terms of the center line l.sub.cap and the radius r.sub.cap) of the capsule 210 is further defined such that the capsule 210 bounds at least a portion of the avatar or virtual character 220.
(34) As shown in
(35) As shown in
(36) Sweep Tests
(37) In accordance with some aspects of the present specification, the collision detection simulation module 132 is configured to perform run-time processing of player input (associated with manipulation of the avatar or virtual character) and collision detection based simulation to enable rendering of the frames of the virtual game space or environment.
(38) Vertical Sweep Test
(39) In accordance with some aspects of the present specification, at run-time at the beginning of a frame (having a frame duration t.sub.frame), the collision detection simulation module 132 is configured to perform a vertical sweep test using the first geometric primitive or model 205that is the cylinder 205. In some embodiments, the first geometric primitive or model 205 is swept vertically downwards to identify a ground obstacle, a ground level and/or a sloping ground/surface. As shown in
(40) In some embodiments, the vertical sweep test is performed automatically by the module 132 and is not necessarily triggered by a prior collision determination. In some embodiments, the vertical sweep test is performed independent of a player's inputs related to the avatar or virtual character 220. In other words, the vertical sweep test, for each frame, is performed irrespective of whether the player does or does not manipulate the avatar or virtual character 220.
(41) In some embodiments, determination of a ground level or a sloping ground/surface, using the first geometric primitive or model 205 for a downward vertical sweep test, amounts to determining an intersection between a cylinder representative of the avatar or virtual character 220 and a plane representative of a horizontal ground level or a sloping ground/surface. Thus, in order to determine ground level or a sloping surface, the downward vertical sweep test determines an intersection of the cylinder model 205 with the ground 225 (which may or may not have a slope) represented by a plane.
(42) In some embodiments, in order to determine collision with a ground obstacle the module 132 is configured to a) determine a first image obtained by projecting the cylinder model 205, in the second position 304, onto the z-axis of the world coordinate system 230, b) determine a second image obtained by projecting the ground obstacle onto the z-axis of the world coordinate system 230, b) determine if a first condition is fulfilled, wherein the first condition is indicative of an overlap or intersection between the first and second image projections, c) determine a third image obtained by projecting the cylinder model 205, in the second position 304, onto the xy plane of the world coordinate system 230, d) determine a fourth image obtained by projecting the ground obstacle onto the xy plane, and e) determine if a second condition is fulfilled, wherein the second condition is indicative of an overlap or intersection between the third and fourth image projections. In some embodiments, if both the first and second conditions are fulfilled, the module 132 concludes that there exists a potential collision of the avatar or virtual character 220 with the ground obstacle.
(43) In some embodiments, the ground obstacle may be represented by a geometric primitive or model of a shape such as, but not limited to, a cylinder, a sphere, a capsule, a rectangle, a pyramid or a polyhedron. In some embodiments, the ground obstacle may be represented by a mesh of geometric primitives. Thus, in embodiments, the cylinder model 205 is used to perform a downward vertical sweep test against both shape-based and mesh-based world collision geometry.
(44) After performing the downward vertical sweep, the model 132 is configured to move or translate the cylinder model 205 from the second position 304 back to the first position 302 prior to performing a horizontal sweep test using the capsule model 210.
(45) It should be appreciated that the capsule model 210 does not participate in the vertical sweep test, in accordance with some embodiments of the present specification.
(46) Horizontal Sweep Test
(47) In accordance with some aspects of the present specification, at run-time at the beginning of the frame (having the frame duration t.sub.frame), the collision detection simulation module 132 is configured to perform a horizontal sweep test using the second geometric primitive or model 210that is the capsule model 210 in order to determine potential collision or contact of the model 210 with an obstacle positioned on the ground 225. It should be appreciated that a level of the ground 225 is already determined using the cylinder model 205 in the vertical sweep test.
(48) As shown in
(49) In some embodiments, where the ground obstacle is stationary, the module 132 uses the direction and velocity imparted to the virtual character 220 at the first position 310, as a result of the player input, in order to determine the second position 312 by predicting a path or trajectory that the virtual character 220 would likely traverse in order to move from the first position 310 to the second position 312.
(50) In some embodiments, where the ground obstacle is moving, the module 132 uses the direction and relative velocity imparted to the virtual character 220 at the first position 310, as a result of the player input, with reference to the ground obstacle in order to determine the second position 312 by predicting a path or trajectory that the virtual character 220 would likely traverse in order to move from the first position 310 to the second position 312.
(51) In some embodiments, the module 132 is configured to simulate a forward horizontal sweep of the capsule model 210 from the first position 310 to the determined second position 312 along the predicted path or trajectory. The simulation results in a volume 315 (also referred to as swept volume) virtually swept by the capsule model 210 from the first position 310 to the second position 312.
(52) In some embodiments, determination of collision with the ground obstacle, using the capsule model 210 for a forward horizontal sweep test, amounts to determining presence of the ground obstacle within the virtual volume 315 swept by the capsule model 210. That is, if the ground obstacle is determined to be present within the swept volume 315, the module 132 concludes a potential collision between the avatar or virtual character 220 and the ground obstacle. In some embodiments, the module 132 performs collision simulation for only those ground obstacles that lie within the virtual environment or game space occupied by the swept volume 315.
(53) In some embodiments, the module 132 determines if the capsule model 210 and the ground object are likely to collide by a) determining if a first condition is fulfilled, wherein the first condition is indicative of whether a first image obtained by projecting the swept volume 315 onto the xy plane of the world coordinate system 230 and a second image obtained by projecting an outer contact surface of the ground object onto the xy plane overlap or contact, and b) determining if a second condition is fulfilled, wherein the second condition is indicative of whether a third image obtained by projecting the swept volume 315 onto the z axis of the world coordinate system 230 and a fourth image obtained by projecting the outer contact surface of the ground object onto the z axis overlap or contact. If both the first and second conditions are fulfilled, the module 132 concludes that the avatar or virtual character will collide or contact the ground obstacle while traversing from the first position 310 to the second position 312.
(54) In some embodiments, the outer contact surface of the ground obstacle may be represented by a collision mesh in the exact shape of the ground obstacle or by a 3 dimensional shape overlaying or bounding the ground obstacle such as, but not limited to, a cylinder, a sphere, a capsule, a rectangle, a pyramid or a polyhedron. Thus, the first condition is determined by the module 132 based on a two-dimensional calculation using the x and y coordinates of the capsule model 210 and a collision mesh or a 3 dimensional bounding shape or volume of the ground obstacle. Also, the second condition is determined by the module 132 based on a one-dimensional calculation using the z coordinates of the capsule model 210 and a collision mesh or a 3 dimensional bounding shape or volume of the ground obstacle.
(55) It should be appreciated that since the capsule model 210 is positioned at the distance d.sub.cap of the cap 213 above the ground 225, the module 132 detects collision of the avatar or virtual character 220 with only those ground obstacles that have a height (or a vertical dimension along a direction parallel to the z axis) greater than the distance d.sub.cap. This enables the player controlled avatar or virtual character to move over small ground obstacles (having heights less than or equal to the distance d.sub.cap) on the ground 225 without requiring frequent halts or changes in the speed and/or direction of motion that would otherwise result from collision detection with the small obstacles.
(56)
(57) Referring now to
(58) In some embodiments, the first geometric primitive or model is a cylinder model that at least partially bounds and approximately represents the avatar or virtual character. The cylinder model is characterized by a center line l.sub.cy (containing the center of mass of the cylinder m.sub.cy) and a radius r.sub.cy such that the center line l.sub.cy is coaxial with the central longitudinal axis of the avatar or virtual character. In an embodiment, the first size (in terms of the center line l.sub.cy and the radius r.sub.cy) of the cylinder model is defined such that the cylinder model bounds an entirety of the avatar or virtual character.
(59) In some embodiments, the second geometric primitive or model is a capsule model having a cylindrical body with semi-spherical/hemispherical first and second ends or caps (also referred to as top and bottom ends or caps). The capsule model is characterized by a center line l.sub.cap (containing the center of mass of the capsule m.sub.cap) and a radius r.sub.cap such that the center line l.sub.cap is coaxial with the central longitudinal axis of the avatar or virtual character. The capsule model has first and second end caps (hemispherical) of radii r.sub.cap.
(60) In some embodiments, the second size (in terms of the center line l.sub.cap and the radius r.sub.cap) and positioning of the capsule model is defined such that a) the capsule model is bounded or encompassed by the cylinder model, b) the capsule model bounds at least a portion of the avatar or virtual character, and c) a tip of the second cap (that lies closer to the ground compared to the first cap) lies a predefined height or distance d.sub.cap above the ground.
(61) At step 404, first data indicative of player input is acquired or detected at the beginning of a frame duration t.sub.frame (that is, at the beginning of a current frame). In some embodiments, the first data includes a first position (or a current position/location) of the avatar or virtual character along with first direction and first velocity, relative to the ground object, imparted to the avatar or virtual character as a result of the player's manipulation of the avatar or virtual character.
(62) In some embodiments, periodic polling of the one or more client devices 110 is performed to acquire the first data. In some embodiments, the periodic polling is performed at a predetermined polling rate. In some embodiments, the polling rate is equal to the frame rate R.sub.framethat is, the rate at which frames are rendered for display on the one or more client devices 110. That is, the collision check is performed at display intervals of the game space frames. If the frame rate is R.sub.frame then the frame duration t.sub.frame=1/R.sub.frame. For example, if the frame rate is 60 fps (frames per second) then the frame duration t.sub.frame1/60 seconds=polling period or duration. In alternate embodiments, however, the polling rate may be set higher than the frame rate.
(63) In some embodiments, an outer contact surface of the ground obstacle may be represented by a collision mesh in an exact shape of the ground obstacle or by a 3 dimensional geometric shape overlaying or bounding the ground obstacle such as, but not limited to, a cylinder, a sphere, a capsule, a rectangle, a pyramid or a polyhedron.
(64) At step 406, second data indicative of at least a second position (or a predicted position/location), at the end of the frame duration t.sub.frame (that is, for a next frame to be rendered), of the avatar or virtual character is determined or predicted. In some embodiments, the second position is determined by predicting a path or trajectory that the avatar or virtual character would likely traverse, from the first position to the second position, based on the first direction and first velocity data derived from the player input.
(65) At step 408, the first geometric primitive or model (that is, the cylinder model) is swept vertically downwards in order to identify the ground obstacle, and/or a ground level or surface that may be horizontal or sloping (with reference to an xy plane of the world coordinate system). In some embodiments, the first geometric primitive or model is swept vertically downwards, from an initial third position to a fourth position, by an extent or a distance E. In some embodiments, the extent or distance E is a sum of the radius r.sub.cap of the second geometric primitive or model (that is, the capsule model), the height or distance d.sub.cap of the second cap above the ground and a predefined distance t. In various embodiments, the predefined distance t is customizable by a computer graphics designer.
(66) At step 410, the first geometric primitive or model is swept vertically upwards back to the third position.
(67) At step 412, the second geometric primitive or model (that is, the capsule model) is swept forward horizontally from the first position to the second position along the predicted path or trajectory in order to determine if the avatar or virtual character is likely to collide or contact the ground obstacle.
(68) It should be appreciated that since the second geometric primitive or model is positioned at the distance d.sub.cap of the second cap (or the bottom cap) above the ground (the level of which has already been identified at step 408 using a vertical sweep test), the module 132 detects collision of the avatar or virtual character with the ground obstacle only if a height (or a vertical dimension along a direction parallel to the z axis) of the ground obstacle is greater than the distance d.sub.cap.
(69) At step 414, a determination is made, based on the vertical and horizontal sweep tests of steps 408 and 412, as to whether a collision is detected. If a collision is detected then, at step 416, an adjusted position, direction and/or velocity of the avatar or virtual character may be determined for a next frame. However, if no collision is detected then, at step 418, the avatar or virtual character is moved to the second position and the second data is used to generate rendering instructions for the next frame.
(70) It should be appreciated that, in alternate embodiments, the order of the steps of the method 400 may be modified. For example, in some embodiments, the step 404 may be performed prior to the step 402.
(71) The above examples are merely illustrative of the many applications of the system of present specification. Although only a few embodiments of the present specification have been described herein, it should be understood that the present specification might be embodied in many other specific forms without departing from the spirit or scope of the specification. Therefore, the present examples and embodiments are to be considered as illustrative and not restrictive, and the specification may be modified within the scope of the appended claims.