Page 1 of 1

Need coding help

Posted: Fri Jun 03, 2016 3:08 am
by darkhog
I'm making a simple raycaster game (wolf3d style) and I want to implement "omnidirectional" sprites (like some in doom) to avoid "rotating around with you" syndrome. However I don't know how to check what angle player is facing object at. I know object's direction (in degrees) and player direction (also in degrees). Can check IF player is facing another object, just not what angle he's looking at.

This is more of a math question and I kinda suck at it (I've found some raycaster on the web and used it as a basis, but it doesn't have omnidirectional functionality). Please help, since I know ZDoom and Doom in general has support for it so I'd like to know how it does that.