# question about the "Directional Light"

## Recommended Posts

Hi,

I've a question about the "Directional Light". In the parameters of this method, we have a "direction" and this direction is a "Vector3" (a 3D point). How make a direction with a only 3D point  (you must have 2 points ?)

##### Share on other sites

This is always a bit complicated to understand when this is the first time you encounter it but with a vector3 you can:

• Define a position
• Define a direction (each component represents the offset for each axis)

What do you do when you have two points? You specify a start and a end point. And you can obtain the direction with the following operation:

direction = endPoint - startPoint

or:

(dx, dy, dz) = (ex - sx, ey-sy, ez-sz)

Do you see what I mean?

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.