Lighting on 3D objects (such as walls)

0 favourites
  • 3 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • This might be an easy fix for some of you but how do I get lighting to work on z elevated 3d objects? As an example, imagine the player has a torch. I can successfully provide realistic lighting as it pertains to the floor, but when I try to apply this to things like walls, which in my case are around 16 Z high, I can't get it to work. I've tried other methods, such as having the 3d objects opacity automatically fade in/out relative to if the lighting sprite is overlapping a wall, and while this works wonderfully in some regards, it ends up being kinda sucky since the wall ends up see through... the other way I thought to do this was to use another light, this time on a 2d layer AND a 3d layer, but I'm not sure how to cut off the 2d layer light after so much distance... anyways.. hope this makes some sense.. any takers?

  • I would have to guess it is just not going to work with the 3d objects since the 3d stuff is finicky and new. Can you send an example of what you are doing I do not know exactly what you mean by light.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello! So, a followup.. I've changed the design to be a flashlight effect. I'm not entirely sure how I'm going to go about it but I have had some success with setting a 'light layer' as 2D and opaque/black, then pinning a white dithering circle sprite to mouse movement x and y, and setting that to destination out. The only problem I am having now is that there is no distance limit so you end up seeing everything ahead of you. I'm now toying with a distance(player.x,player.y,family.x,family.y) to hopefully curb what is 'lit up' based on distance from player to object. If you know of a better way to implement a flashlight effect while rendering in 3d though I'm open for tips!! Lol

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