I need some verification

Blitz3D Forums/Blitz3D Programming/I need some verification

Spacemonkey(Posted 2006) [#1]
To calculate a point-light point in space, I have made this;

Test code!

lightDir0 = EntityX#( CubePoint01 , False ) - EntityX#( Light , True )
lightDir1 = EntityY#( CubePoint01 , False ) - EntityY#( Light , True )
lightDir2 = EntityZ#( CubePoint01 , False ) - EntityZ#( Light , True )

x# = EntityX#( Light , True ) + lightDir0 * extrudevalue
y# = EntityY#( Light , True ) + lightDir1 * extrudevalue
z# = EntityZ#( Light , True ) + lightDir2 * extrudevalue

It will calculate the right values from the light view.

My question is then; can it be this simple or have I missed something out?

[Edit]
O_o


Ross C(Posted 2006) [#2]
Your basically getting the normals, and multiplying by your extrude value then? I don't see why that wouldn't work :o)