Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / point light not working?

Author
Message
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 18th May 2013 21:53 Edited at: 18th May 2013 22:34
i create a point light and then try to have it move with camera (or just stay at 0,0,0) but it doesn't show. however, a directional light does show.

p.s. it should show with that radius, it's not the case that the radius is too small
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 18th May 2013 22:42 Edited at: 18th May 2013 22:53
setObjectLightMode(d, 1)

Pointlights do work, and that radius IS very small. It's not a world coordinate radius that you set, you could call it "brightness" instead.

Edit:

Quote: "Paul Johnston
The radius isn't in world units, it is a parameter into a quadratic fall off calculation so whilst larger values will extend the range of the light it isn't calibrated to the 3D world."


This means that with your 10 radius an object needs to be 1 unit from the source to get full light.

My hovercraft is full of eels
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 18th May 2013 23:03
i still only see the directional light :/
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 19th May 2013 00:11
Mkay, weird. Try setting "l = 1". Not sure if the shader assumes the ID of the pointlight is 1 but it's worth a shot, never tried anything else myself.

My hovercraft is full of eels
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 19th May 2013 00:15 Edited at: 19th May 2013 00:16
if i set m = 2, and l = 1, there is no longer directional light. point light does not show, either.
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 19th May 2013 01:12 Edited at: 19th May 2013 01:31
Sorry if that was unclear.

Set L = 1, leave M = 1 also.

Quote: "From helpfile:
Point light IDs are separate from diretional light IDs."


My hovercraft is full of eels
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 19th May 2013 03:10
ah. now it works!
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 19th May 2013 03:19
extra question: i don't see a makeCamera or createCamera function? is it possible to have an extra camera which is tied to a texture or sprite?
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 19th May 2013 20:16
You mean to create a mirror and suchlike? I think the simple answer is; no, not yet anyway.

My hovercraft is full of eels

Login to post a reply

Server time is: 2024-11-24 14:51:29
Your offset time is: 2024-11-24 14:51:29