normal map lighting and position weirdness

This forum is currently in read-only mode.
From the Asset Store
A template which allows you to customise the controls of your game.
  • Any idea what's going on here? The only way to slow it down is to divide the mouse x/y by some huge number, but even then it seems to be guesswork and the more the mouse moves away from 0,0 the further apart the light and the mouse coords get.

    Same happens with using a sprites position for the normal map light too.

    Download: here

  • AFAIK 0 becomes left (or top) and 1 is right (or bottom) of the screen.... screen which is rotated along with the sprite.

    Yeah.

  • AFAIK 0 becomes left (or top) and 1 is right (or bottom) of the screen.... screen which is rotated along with the sprite.

    Yeah.

    Yeah :\ So how can you keep the textures lightsource where the mouse pointer is, without the positions eventually becoming out of wack. Using MouseX/somelargenumber improves things, but isn't perfect, the more the mouse moves away from 0,0 the more the two become out of synch. Course use of the mouse was just to make the problem easier to explain. The use of it would be more along the lines of a player moving along with a torch, so it follows as it goes, causing the slight changes to the walls, floor etc. Which would add a nice extra effect to having a regular light effect on top of that.

  • This is why I wrote Heightmap Plus.... but sometimes heightmaps don't cut it and you really need to use a normal map.

    I plan to introduce a normalmap plus effect at some point, with an angle input to compensate effortlessly. You could do the math in events, but yeah it's a bit hard.

  • This is why I wrote Heightmap Plus.... but sometimes heightmaps don't cut it and you really need to use a normal map.

    I plan to introduce a normalmap plus effect at some point, with an angle input to compensate effortlessly. You could do the math in events, but yeah it's a bit hard.

    That would be awesome! And very, very useful. I'll look into heightmap plus in the meantime. I saw it in the list but didn't look into those so much.

    *Le sigh* Wish I could code like that, doing little plugins and extra's would be far more useful to the majority, than artwork, which would have to be all specific for every user.

  • There's pretty simple calculation that checks the size of screen and does some stuff and you get the light point exactly where you want as example at mouse. Or isn't this what you want?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's pretty simple calculation that checks the size of screen and does some stuff and you get the light point exactly where you want as example at mouse. Or isn't this what you want?

    Sounds like what I was looking for, yeah. Mouse or Sprite. That would be great!

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