GetLOSBetweenPoints
#10

Basically store the wall as a plane, this could easily be calculated from the rotation and position. Then calculating where the aiming vector, or the vector between player and postion to be checked, cuts the plane is a piece of cake, last step would be checking if that cutting point is on the wall, or next to it (easily using x>wallx etc).
Calculations are all quite lightweighted, especially if you store the plane representation of the wall once you calculated it (e.g. after CreateObject) Things just get nasty when the object is more than a wall, and not plane, then youll need to do tons of checks with this method.
I might also explain this in detail if i find the time/motivation to.
That was my first idea for hitdetection two years ago, until I found a better way.
Reply


Messages In This Thread
GetLOSBetweenPoints - by BloodyEric - 16.07.2012, 12:58
Re: GetLOSBetweenPoints - by BloodyEric - 16.07.2012, 13:11
Re: GetLOSBetweenPoints - by Maxips2 - 16.07.2012, 17:41
Re: GetLOSBetweenPoints - by MP2 - 16.07.2012, 17:57
Re: GetLOSBetweenPoints - by Mauzen - 16.07.2012, 18:38
Re: GetLOSBetweenPoints - by Joe Staff - 16.07.2012, 19:00
Re: GetLOSBetweenPoints - by Maxips2 - 16.07.2012, 19:39
Re: GetLOSBetweenPoints - by JoBullet - 16.07.2012, 20:17
Re: GetLOSBetweenPoints - by BloodyEric - 16.07.2012, 20:30
Re: GetLOSBetweenPoints - by Mauzen - 16.07.2012, 21:22
Re: GetLOSBetweenPoints - by Maxips2 - 17.07.2012, 07:59
Re: GetLOSBetweenPoints - by Slice - 17.07.2012, 11:42
Re: GetLOSBetweenPoints - by CyNiC - 17.07.2012, 13:25
Re: GetLOSBetweenPoints - by Slice - 17.07.2012, 13:28
Re: GetLOSBetweenPoints - by Maxips2 - 17.07.2012, 14:20
Re: GetLOSBetweenPoints - by Mauzen - 17.07.2012, 15:06
Re: GetLOSBetweenPoints - by [HLF]Southclaw - 18.07.2012, 09:53

Forum Jump:


Users browsing this thread: 1 Guest(s)