POV-Ray : Newsgroups : povray.advanced-users : Box pointing to target vector : Re: Box pointing to target vector Server Time
2 Jul 2024 19:40:54 EDT (-0400)
  Re: Box pointing to target vector  
From: MadKairon
Date: 28 Mar 2010 08:50:00
Message: <web.4baf5053cd7385dc5e975f010@news.povray.org>
A bit better...

box { <-.025,0,-.025>, <.025,VDist(<0,0,0>, vect),.025> pigment { rgb <.2,0,0>}
    rotate <0,0,degrees( atan2( vect.y, vect.x )) - 90>
    rotate <0,degrees(atan2(VDist(<vect.x,vect.y,0> , vect),vect.z)),0>
    }

First it rotates the box around Z axiz. That works right. But the second
rotation around Y axiz is wrong. Anybody knows how to fix that? thanks


Post a reply to this message

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