c# - Controlling Player Movement After Per Pixel Collision -


enter image description here

i have implemented full per pixel collision system accounts rotation, , accurate. returns simple bool on collision.

however not sure how handle collision player movement point of view.

e.g. in picture above, if player holding on left stick, should stopped, if holding + right diagonal on left stick, should slide northeast alongside side of red square naturally.

how go this, make player’s momentum stop, still give control player move in direction not blocked collision.

i kind of thing simple untransformed rectangles, going per-pixel texture collision has made brain explode today i’m hoping guys can help. advice massively appreciated.

it possible. need implement physics engine pixel based collision if willing give natural effect in game.

for either write own game engine or use engine there. 2d game highly recommended farseer physics engine. out there long time. in stable condition , surely wonderful.

it developed using xna scratch, , performance wise far good.

have @ this. hope able give answer. please let me know if more details needed.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -