[Fluxus] small commit

Dave Griffiths dave at pawfal.org
Tue Sep 8 03:18:13 PDT 2009


On Tue, 2009-09-08 at 11:12 +0100, Dave Griffiths wrote:
> On Tue, 2009-09-08 at 08:41 +0200, gabor papp wrote:
> > > i added a new function, (get-pos) to get the position of an object from 
> > > the physics system.
> > i realized i was coding too early instead of thinking first again. 
> > actually the physics system writes back all the transformation info to 
> > the primitive which can be read simply like this:
> > define (get-pos)
> >      (let ([t (get-global-transform)])
> >          (vector (vector-ref t 12)
> >                  (vector-ref t 13)
> >                  (vector-ref t 14))))
> 
> I generally do this:
> 
> (define (get-pos)
>   (vtransform (vector 0 0 0) (get-global-transform)))
> 
> As I think it might be safer as it includes the rotation and scale - but
> I'm not sure in this case   your way would be faster.
                            ^as

...




More information about the Fluxus mailing list