1 decade ago by RationalGaze
Hi there,
i would like to create a function in my main.js which is able to manage "collisions" between my entities. I call it fake collisions because my entities just go from a position to another position, they dont have any speed/velocity and collisions properties are useless then.
the idea behind this function would be like comparing two positions on the Y axis (or X) and decide how entities would react.
but my game is a tetris like, so among those two entities one doesn't move and one is falling.
the difficulty is to make act these entities like if they were colliding.
i would like to create a function in my main.js which is able to manage "collisions" between my entities. I call it fake collisions because my entities just go from a position to another position, they dont have any speed/velocity and collisions properties are useless then.
the idea behind this function would be like comparing two positions on the Y axis (or X) and decide how entities would react.
but my game is a tetris like, so among those two entities one doesn't move and one is falling.
the difficulty is to make act these entities like if they were colliding.