0 Favourites

Eye thing that follows mouse

This forum is currently in read-only mode.
  • <img src="http://img399.imageshack.us/img399/9625/screenshotpn5.png">

    Techniqually this was a one event example until I decided I wanted to rave it up a bit by putting a gradient over the top which changes colour...

    How it works: The eye is positioned at the mouse, then I work out the distance and angle between the mouse and the middle of the eye socket. I then divide the distance, and cap it to 32 pixels. Then I position the eye to the centre of the socket, and then move it by the distance and angle. Finally to add a bit of realism, I scale the eye down slightly by subtracting the distance from it, so it will become smaller as it leaves the centre (as eyes are spherical).

    And thats about it I figured this might be useful if someone wanted to make eyes in a game which looked at things (for example, eyes on a portrait that look at the player...perhaps even the players eyes which look at the mouse in a mouse aim game...)

    I'm wondering if this could be useful as a behaviour...just two actions 'set socket position' and 'look at'...then some tweaking variables that affect it. The intial position of it in the layout could be the default 'socket position' and then if you wanted to make eyes on a portrait that looked at the player you would just use a single action : 'look at player' So what are your thoughts?

  • really nice. im assuming some trial and error was required to get that eye to behave correctly? add some breathing to face for more humanlikeness. blinking maybe? (yes with that quality of graphic i know its pretty much out of the question for a small tech demo lol. but anyways, would make it cool.) this would be perfect for a tittle screen or cutscene. nice work man.

  • Yeah that would be really cool for Myst kinda game.

    I made something like that a while back in flash.

    http://img20.imageshack.us/my.php?image=myonewtgu9.swf&width=150

    Ok not really like that, but it could be doable in Construct.

  • impressing

    nothing more to say

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I think making a behavior for it would be a great idea... mainly because it could be used and applied in a lot of other instances than just eyes. I can't test the thing here to see what it actually looks like since I'm st work and all, but I get the general idea and yeah... that would rock.

    ~Sol

  • That is really really freaky...lmao

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)