It is hard to understand why directional lights position doesn't make sense
. I mean , take 3d modelling program ,or UDK or Unity(ok that is not the
same in terms of technology ) , but the light should have emission source
and the soruce should have a position in 3d space ? . and the source
position  of DirectionalLight3D is in the center of the scene, So if my
object is not offset from the center ,there is  a problem , the object
doesn't receive the light at all . And .direction doesn't help in this case,
I was trying to tweak it too without much success . Eventually used
PointLight3d.

On Mon, Jun 7, 2010 at 10:35 AM, richardolsson <[email protected]> wrote:

> The direction property is the way to go. As of 3.5, directional lights
> don't have positions, which never made sense anyway since dir lights
> are orthographic in a way, and not to be considered as point in space
> -- they are infinitely far away.
>
> If you cannot get direction to work like below, make sure you are
> using materials that support dir lights!
>
> var light : DirectionalLight3D = new DirectionalLight3D;
> light.direction = new Number3D(0, -1, 0); // Downward
>
> Cheers
> /R
>
> On Jun 5, 10:15 pm, fab4ce <[email protected]> wrote:
> > Hi Fabrice,
> >
> > PointLight3D has a position property, but DirectionalLight3D doesn´t
> > have it.
> >
> > On 5 Jun., 19:53, Fabrice3D <[email protected]> wrote:
> >
> >
> >
> > > there is a position property
> >
> > > Fabrice
> > > On Jun 5, 2010, at 2:08 AM, fab4ce wrote:
> >
> > > > Hi all,
> > > > after updating to the new version 3.5 i had to change my directional
> > > > light from view.scene.addChild(light) to view.scene.addLight(light);
> > > > How can change my code for positioning the light in the scene? I was
> > > > using the .x and .y and .z properties of the light object.




-- 
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Air |3D|Unity|
www.neurotechresearch.com
http://blog.alladvanced.net
http://www.meetup.com/GO3D-Games-Opensource-3D/
Tel:054-4962254
[email protected]
[email protected]

Reply via email to