Hi Jay,

Have you had any luck with this?

I believe im having the same sort of problem - im trying to set an
objects position to the camera position so that the object is where
the 'viewer' appears to be but the object appears to be in front of
the 'viewer' when i do this.

Just wondering if u solved it?

On Nov 3, 1:28 pm, Jay <[email protected]> wrote:
> I've been hammering away at possible solutions, and have thus found
> nothing.  I'm including a link to my project as it stands, but I warn
> that it is very rough and pretty ugly looking.
>
> http://jaydomagala.com/A3DPolyTest.swf
>
> My code loading the camera and the hook (the currently offending
> piece):
>
> private function initCamera() : void
>                 {
>                         camera = new Camera3D({zoom:4, focus:100, x:0, y:35, 
> z:-75});
>                         camera.lens = new PerspectiveLens();
>
>                         clipping = new FrustumClipping();
>
>                 }// initCamera
>
> private function initHook() : void
>                 {
>                         hook = 
> Collada.load("../assets/models/hook.dae").handle;
>
>                         // this file is huge
>                         // TODO: get this remodelled proper size
>                         hook.scaleX = hook.scaleY = hook.scaleZ = .009;
>
>                         // these values are as of now arbitrary and have been 
> tested a
> dozen times different ways
>                         hook.y = 35;
>                         hook.x = camera.x;
>                         hook.z = camera.z + 75;
>                         // i tried moving the hook's pivot itself and got 
> unsatisfactory
> results
>                         //hook.movePivot(camera.x, camera.y, camera.z);
>
>                         // now, i'm attempting to dump it into a container, 
> which is how it
> runs now
>                         hookContainer = new ObjectContainer3D(hook);
>                         hookContainer.movePivot(camera.x, hookContainer.y, 
> camera.z);
>
>                         view.scene.addChild(hookContainer);
>                 }// initHook
>
> To see the behaviour I'm attempting to fix, use A and D to rotate.  My
> code at present has the pivot moving to hookContainer's y, but it does
> not work with camera's y either.  In fact, that drags the hook down on
> top of making it not function as desired.
>
> Is there anything I'm overlooking?  Is there a certain way I should be
> going about all this?  Any shove in the right direction, or away from
> the wrong, would be appreciated.

Reply via email to