Author Topic: Positional light  (Read 1929 times)


  • Jr. Member
  • **
  • Posts: 32
Positional light
« on: June 26, 2012, 02:48:48 PM »
I have seen that Lights are created as directional by default. I could not find in the documentation of the Light class a method to change it from directional to positional.


  • Administrator
  • *****
  • Posts: 116
    • Bonzai Engine
Re: Positional light
« Reply #1 on: June 26, 2012, 02:54:07 PM »
To change the type of the light (positional or directional), set the w component of Light.setPositionOrDirection properly ie 0 or 1. You can play with the model viewer with the various parameters of a Light.

For more informations, you can give a look the Light javadoc or better how the fixed pipeline lights works in opengl.