6/9/2023 0 Comments Game maker z axisThis script does two things: first, it checks to see if the ball is squashed and if so, restarts the game. If collision_circle(x, y, 8, chi_gate, false, false) & other.z<32 thenĮlse if collision_circle(x, y, 16, chi_gate, false, false) & other.z<32 thenĭirection = point_direction(other.x, other.y, x, y) When the ball object ( obj_ball) collides with the gate object ( chi_gate), what happens? Well, the script scr_ball which holds the following code, is executed: The wall object (chi_block) is a solid object that the ball object bounces off. If you study the editable file, you will find that the standard method of collision checking and bouncing off solid objects was used. If you run it, you will see a ball object that bounces off walls. But what happens when there are three dimensions in stead of two? Let’s take a look at the gm6 that comes with this tutorial. You can make a ball bounce off a wall, for instance. If you think of a 2D game, you will probably know that the built-in collision detection of GM is very useful. You probably have used collision detection in a 2D Game Maker game. Helping us by making the code compatible is appreciated.Ĭollisions are a vital part of almost any game. This tutorial has not been tested on ENIGMA.
0 Comments
Leave a Reply. |