The Daily Click ::. Forums ::. Klik Coding Help ::. Shadow Engine Query
 

Post Reply  Post Oekaki 
 

Posted By Message

vetmora120



Registered
  07/01/2010
Points
  273
24th August, 2010 at 08:17:42 -

In his particular example, he uses 32 directions to rotate the light. Is it possible to make it rotate with 360 degree directions? I've tried this and it works on the actual light object, just doesn't seem to apply it to the Overlay object... Any help would be appreciated.

Also is there any way to get the Overlay to follow the player for larger levels? Without this lagging or going invisible when not in the top left corner of the stage? I don't know if this is possible.

The following link is the exact version I'm referring to.
http://andersriggelsen.dk/files/examples/ShadowEngine2.mfa

Thanks, Vetmora

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
24th August, 2010 at 21:47:29 -

At work so I cant download.

If you are trying to get a body of light (in a cone shape I'm assuming) to follow the player, just angle the light towards the player. Make the smallest point (where the light begins)the hotspot, find the angle between the light and the player, and voila.

Someone else can post the formula for angle between two objects because I don't know it off hand because I suck .

 
n/a

vetmora120



Registered
  07/01/2010
Points
  273
25th August, 2010 at 06:19:01 -

Haha, thanks for the reply, but perhaps I hadn't explained it clear enough. The light cone object that the overlay pastes into itself rotates 360 degrees no problem, but of course, this is invisible in real-time. The problem I can't get the overlay to paste the 360 degree light cone, it will only paste a 36 direction object.

My other query is still open for answers. I also have another one: Is there a way to make the shadows always stick to a certain object? For instance, I have a door and I want the same light-shadow to apply to it, so when it is open the shadows angle with the object.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click