Warning: Undefined array key "translationlc" in /usr/www/users/fabook/_diggets/doc/v2/lib/plugins/translation/action.php on line 237
Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/fabook/_diggets/doc/v2/lib/plugins/translation/action.php:237) in /usr/www/users/fabook/_diggets/doc/v2/inc/parser/code.php on line 33
Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/fabook/_diggets/doc/v2/lib/plugins/translation/action.php:237) in /usr/www/users/fabook/_diggets/doc/v2/inc/parser/code.php on line 34
Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/fabook/_diggets/doc/v2/lib/plugins/translation/action.php:237) in /usr/www/users/fabook/_diggets/doc/v2/inc/parser/code.php on line 35
procedure TForm1.DoOnViewportMouseMove(ASender : TObject; AShiftState : TShiftState;
X, Y : Single);
var LPt3D : TPoint3D;
LRayPos, LRayDir : TVector3D;
begin
if FMove then
begin
if (ssLeft in AShiftState) then
begin
FGorilla.BeginUpdate();
try
LPt3D := FGorilla.ScreenToWorld(PointF(X, Y));
FGorilla.Context.Pick(X, Y, TProjection.Camera, LRayPos, LRayDir);
FGrass.RayCastIntersect(LRayPos, LRayDir, LPt3D);
// apply scaled light position
FGrassMat.Spot := TPoint3D(LPt3D);
finally
FGorilla.EndUpdate();
end;
end;
FLatest := PointF(X, Y);
end;
end;