Jump to content
Posted 21 November 2012 - 06:08 AM
Posted 21 November 2012 - 11:11 AM
Posted 21 November 2012 - 12:00 PM
(PlayerDir.x * EnemyDir.x + PlayerDir.y * EnemyDir.y);
Edited by DgekGD, 21 November 2012 - 12:04 PM.
Posted 22 November 2012 - 12:36 AM
Posted 22 November 2012 - 11:55 AM
Edited by Stroppy Katamari, 13 December 2012 - 04:02 PM.
Posted 27 November 2012 - 06:59 PM
Posted 28 November 2012 - 05:28 AM
It would be considerate to tell how you resolved your problem, both for the benefit of those who have the same problem later, and for the benefit of those who tried to give you advice.
I have resolved this problem.
Posted 28 November 2012 - 11:12 AM
Posted 30 November 2012 - 02:26 PM
Edited by P0jahn, 30 November 2012 - 02:26 PM.
Posted 13 December 2012 - 11:27 AM
Posted 13 December 2012 - 12:21 PM
Posted 13 December 2012 - 01:04 PM
Posted 13 December 2012 - 01:42 PM
But what would happen if this test is performed when they are intersecting already?
Posted 13 December 2012 - 03:20 PM
Posted 13 December 2012 - 04:00 PM
If you just have the locations of two overlapping rectangles, there is no way to tell accurately whether they collided vertically or horizontally. You have to know where they came from, in other words, where they were at last frame. Current position minus velocity gives you that last position, so you don't have to store the last position separately.
Well my so called "solution" was limited to work with one single situation and the code is not reusable.
I want a global method to check this, so I have looked a bit closer at Stroppy Katamaris post.
With all due respect, your text is cryptic. Why is velocity needed? Old R2? timex/timey?
Could you please clarify your post?