1 decade ago by Rockster160
henonchesser, would you mind posting your main.js? I don't see anywhere that you established ig.input.bind to your directional movements.
Joncom, I've made a couple adjustments to the gridmovement class to include things like last direction and such to make it more useable with graphics. Anyway! I'm having an issue getting more direct collisions. I feel like I saw a comment where you mentioned something along the lines of the entity actually moving a couple pixels past the visual sprite before locking back into place. Is there a work around for that?
I'm having an issue where the player acts as though he is 'colliding' into an enemy when he moves into a space in the direction that faces the enemy.
For example, since I feel that was hard to understand. If the enemy is at [2,2] and the player is at [0,2] then moves onto [1,2] it is counted as a collision. There is no collision problem with being next to the enemy at all, only if the player moves into an adjacent block in the direction of the enemy. Any ideas? I'll post my code if requested, though I don't feel as though it changes much. Currently all entity sizes are 32x32 as well as tile sizes. Changing any of these seems to break it, although the enemy is more like 16x23.
Joncom, I've made a couple adjustments to the gridmovement class to include things like last direction and such to make it more useable with graphics. Anyway! I'm having an issue getting more direct collisions. I feel like I saw a comment where you mentioned something along the lines of the entity actually moving a couple pixels past the visual sprite before locking back into place. Is there a work around for that?
I'm having an issue where the player acts as though he is 'colliding' into an enemy when he moves into a space in the direction that faces the enemy.
For example, since I feel that was hard to understand. If the enemy is at [2,2] and the player is at [0,2] then moves onto [1,2] it is counted as a collision. There is no collision problem with being next to the enemy at all, only if the player moves into an adjacent block in the direction of the enemy. Any ideas? I'll post my code if requested, though I don't feel as though it changes much. Currently all entity sizes are 32x32 as well as tile sizes. Changing any of these seems to break it, although the enemy is more like 16x23.