Re: Collision detection in 2d games when turning is a thing?
Hi, that's almost what I've been trying to do. My player is moving with double precision though, so I have been having a bit of trouble. Here's my player class, it, might help explain things.
https://www.dropbox.com/s/ftt153iohif5c … r.bgt?dl=1
I have been using the unit vector method to calculate how far the player moves already. I am familiar with trig, I'm just unsure how to apply it to what I'm trying to do here. As I said in my first post. I know I can get the distance and angle between a player and, something like a wall like this.
dX = playerX-targetX dY = playerY-targetY atan(dY/dX)
I'm just, not sure how to apply that knowledge to programming. If that makes any sense.
Thanks very much for all the help and suggestions!
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector