Non-transitory computer-readable storage medium having game program stored therein, game processing system, game processing apparatus, and game processing method
When a first speed indicating a speed difference between a first object and another object at a point of contact between both objects, or a ratio of the first speed to a second speed indicating a speed difference between centers of gravity of both objects, is within a first range including 0, a rolling sound is outputted. When the first speed or the ratio of the first speed to the second speed is within a second range not including 0, a sliding sound is outputted.
1. A non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor of an information processing apparatus, cause the information processing apparatus to:
control motion of a first object in a virtual space;
when the first object and another object are in contact with each other and are not stationary relative to each other,
calculate a point of contact between the first object and the other object;
compare a first speed indicating a speed difference between the first object and the other object at the point of contact and a second speed indicating a speed difference between a center of gravity or a predetermined reference point of the first object and a center of gravity or a predetermined reference point of the other object; and
when the first speed or a ratio of the first speed to the second speed satisfies a first condition of being within a first range including 0,
perform a first process for the first object, and
when the first speed or the ratio of the first speed to the second speed satisfies a second condition of being within a second range not including 0,
perform a second process for the first object.
2. The storage medium according to claim 1 , wherein
the first process is a process of outputting a first sound associated with the first object, and
the second process is a process of outputting a second sound associated with the first object and different from the first sound.
3. The storage medium according to claim 2 , wherein
the first process is a process performed when the first object is rolling on the other object, and
the second process is a process performed when the first object is rubbing or sliding on the other object.
4. The storage medium according to claim 3 , wherein the instructions further cause the information processing apparatus to:
when the second condition is satisfied,
determine a direction in which the first object rotates while rubbing or sliding on the other object, on the basis of whether a speed of the first object at the point of contact with respect to the center of gravity or the predetermined reference point of the first object is positive or negative.
5. The storage medium according to claim 2 , wherein the instructions further cause the information processing apparatus to control the motion of the first object on the basis of physics calculation based on at least virtual power, virtual gravity, and collision.
6. The storage medium according to claim 1 , wherein the second range is a range where the first speed or the ratio of the first speed to the second speed falls outside the first range.
7. The storage medium according to claim 1 , wherein
the other object is an object that does not move in the virtual space,
the first speed is a speed of the first object at the point of contact, and
the second speed is a speed of the center of gravity or the predetermined reference point of the first object.
8. The storage medium according to claim 7 , wherein the other object is a terrain object in the virtual space.
9. The storage medium according to claim 1 , wherein
the other object is an object that moves in the virtual space,
the first speed is a relative speed between the first object and the other object at the point of contact, and
the second speed is a relative speed between the center of gravity or the predetermined reference point of the first object and the center of gravity or the predetermined reference point of the other object.
10. A game processing system, comprising:
a processor and a memory coupled thereto, the processor being configured to control the processing system to at least:
control motion of a first object in a virtual space;
when the first object and another object are in contact with each other and are not stationary relative to each other,
calculate a point of contact between the first object and the other object;
compare a first speed indicating a speed difference between the first object and the other object at the point of contact and a second speed indicating a speed difference between a center of gravity or a predetermined reference point of the first object and a center of gravity or a predetermined reference point of the other object; and
when the first speed or a ratio of the first speed to the second speed satisfies a first condition of being within a first range including 0,
perform a first process for the first object, and
when the first speed or the ratio of the first speed to the second speed satisfies a second condition of being within a second range not including 0,
perform a second process for the first object.
11. The game processing system according to claim 10 , wherein
the first process is a process of outputting a first sound associated with the first object, and
the second process is a process of outputting a second sound associated with the first object and different from the first sound.
12. The game processing system according to claim 11 , wherein
the first process is a process performed when the first object is rolling on the other object, and
the second process is a process performed when the first object is rubbing or sliding on the other object.
13. The game processing system according to claim 12 , wherein the processor is further configured to:
when the second condition is satisfied,
determine a direction in which the first object rotates while rubbing or sliding on the other object, on the basis of whether a speed of the first object at the point of contact with respect to the center of gravity or the predetermined reference point of the first object is positive or negative.
14. The game processing system according to claim 11 , wherein the processor is further configured to control the motion of the first object on the basis of physics calculation based on at least virtual power, virtual gravity, and collision.
15. The game processing system according to claim 10 , wherein the second range is a range where the first speed or the ratio of the first speed to the second speed falls outside the first range.
16. The game processing system according to claim 10 , wherein
the other object is an object that does not move in the virtual space,
the first speed is a speed of the first object at the point of contact, and
the second speed is a speed of the center of gravity or the predetermined reference point of the first object.
17. The game processing system according to claim 16 , wherein the other object is a terrain object in the virtual space.
18. The game processing system according to claim 10 , wherein
the other object is an object that moves in the virtual space,
the first speed is a relative speed between the first object and the other object at the point of contact, and
the second speed is a relative speed between the center of gravity or the predetermined reference point of the first object and the center of gravity or the predetermined reference point of the other object.
19. A game processing apparatus, comprising:
a processor and a memory coupled thereto, the processor being configured to control the game processing apparatus to at least:
control motion of a first object in a virtual space;
when the first object and another object are in contact with each other and are not stationary relative to each other,
calculate a point of contact between the first object and the other object;
compare a first speed indicating a speed difference between the first object and the other object at the point of contact and a second speed indicating a speed difference between a center of gravity or a predetermined reference point of the first object and a center of gravity or a predetermined reference point of the other object; and
when the first speed or a ratio of the first speed to the second speed satisfies a first condition of being within a first range including 0,
perform a first process for the first object, and
when the first speed or the ratio of the first speed to the second speed satisfies a second condition of being within a second range not including 0,
perform a second process for the first object.
20. The game processing apparatus according to claim 19 , wherein
the first process is a process of outputting a first sound associated with the first object, and
the second process is a process of outputting a second sound associated with the first object and different from the first sound.
21. A game processing method executed by a computer configured to control a game processing system, the game processing method causing the game processing system to:
control motion of a first object in a virtual space;
when the first object and another object are in contact with each other and are not stationary relative to each other,
calculate a point of contact between the first object and the other object;
compare a first speed indicating a speed difference between the first object and the other object at the point of contact and a second speed indicating a speed difference between a center of gravity or a predetermined reference point of the first object and a center of gravity or a predetermined reference point of the other object; and
when the first speed or a ratio of the first speed to the second speed satisfies a first condition of being within a first range including 0,
perform a first process for the first object, and
when the first speed or the ratio of the first speed to the second speed satisfies a second condition of being within a second range not including 0,
perform a second process for the first object.
22. The game processing method according to claim 21 , wherein
the first process is a process of outputting a first sound associated with the first object, and
the second process is a process of outputting a second sound associated with the first object and different from the first sound.