dav74 Posted November 3, 2013 Share Posted November 3, 2013 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 ?)Thanx for your help Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 3, 2013 Share Posted November 3, 2013 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 - startPointor:(dx, dy, dz) = (ex - sx, ey-sy, ez-sz) Do you see what I mean? Quote Link to comment Share on other sites More sharing options...
dav74 Posted November 3, 2013 Author Share Posted November 3, 2013 Thanks for your answer, it's OK, i'm newbie about the "3D coding" but not about mathematics ;-) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 3, 2013 Share Posted November 3, 2013 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.