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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×