Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Memfis

Monster's eyes?

Recommended Posts

Technically speaking, where are a monster's eyes located, like at his height, at half of his height or where?

Share this post


Link to post

From Doomsday:

// The line-of-sight is from the "eyes" of the beholder.
vec3d_t from = { beholder->origin[VX], beholder->origin[VY], beholder->origin[VZ] };
if(!P_MobjIsCamera(beholder))
{
    from[VZ] += beholder->height - (beholder->height / 4);
}

Share this post


Link to post

Vanilla is similar:

sightzstart = t1->z + t1->height - (t1->height>>2);
topslope = (t2->z+t2->height) - sightzstart;
bottomslope = (t2->z) - sightzstart;
A monster's eyes are three-quarters of its height above the floor, and can see the entire height of the player from his feet to his head (no use hiding behind a 48-unit high wall, for example). Widths of things are not taken into account for line-of-sight checking.

Share this post


Link to post

So how could they program realistic line-of-sights but not the ability to walk over monsters?

Share this post


Link to post
Foxpup said:

Widths of things are not taken into account for line-of-sight checking.

Krispy said:

realistic line-of-sights


*imagines a Mancubus "hiding" behind a 1-pixel wide pillar*

Sounds like the old elephants hiding behind daisies joke :-)

Share this post


Link to post

Well, you can hide from an arch-vile behind a 1-map-unit pillar, as demonstrated in this most scholarly video:

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
×