POV-Ray : Newsgroups : povray.advanced-users : Vector to Angle : Re: Vector to Angle Server Time
28 Apr 2024 22:51:39 EDT (-0400)
  Re: Vector to Angle  
From: Alain
Date: 16 Dec 2017 15:02:16
Message: <5a357bc8@news.povray.org>
Le 17-12-15 à 15:57, dick balaska a écrit :
> On 12/15/2017 07:50 AM, Bald Eagle wrote:
>>  argh.
>>
>> So, just so I fully understand what you want,
>> 1. You want to have a flashlight that always points at "Lookat"
>> 2. You want it offset by a certain amount from the camera position
>>
>> 3.  ... ? (if any)
> 
> Yes, like in Doom, where the gun is in a fixed position relative to the 
> game window.
> 
> (Wait, isn't there a text thingy in the object library that draws text 
> in a fixed position on the screen? ...)
> 
> 

Locate your light at the same location as the camera, with a slight 
offset if you want.
Make it a spot_light.
Spotlight have a point_at parameter, make it the same as your look_at. 
point_at default to <0,0,0> if you don't set it.

#declare Light_Offset = <0, -0.5, 0>;
Camera{Cam_Location look_at Somewhere}
light_source{Cam_location + Light_Offset
    rgb 1
    spotlight
    radius 5
    tightness 40
    point_at Somewhere
  }


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.