Tweening lookat & Skybox flicker

Software: Away3D 4.x

Avatar
Darcey, Moderator
Posted: 07 March 2014 09:08 PM   Total Posts: 209

Hi,

I am trying to tween rotationX, Y & Z values of an object to match the direction in which it will be tweened to on the x,y,z.

For this I simply have a target and lookat cube.
1. Target becomes the target vector x,y,z
2. I set the lookat cube to the starting position
3. I set the lookat cube to look at the target vector
4. I then tween the spaceship’s rotationX,Y & Z vallues to match that of the lookat cube.

However it has some interesting results (6mb so please be patient for loading): http://www.allforthecode.co.uk/dev/away3d/random_lookat/

What would be the best way to do this so that I can optimise the lookat tween without it doing a complete 360 or seasaw effect from time to time?

Also I’ve noticed the skybox flickers, hold left mouse button down and drag around slowly you will notice triangles / huge black gaps appearing randomly (no special coding on the SkyBox or BitmapCubeTexture).

Thanks

Darcey

   

John Brookes, Moderator
Posted: 08 March 2014 01:01 AM   Total Posts: 732   [ # 1 ]

If your doing it that way then use TweenMax and the ShortRotationPlugin

Or without max then quaternion slerp.
Know ive got an example somehwhere but cant find it :/

   

Avatar
Darcey, Moderator
Posted: 08 March 2014 01:50 AM   Total Posts: 209   [ # 2 ]

Nice, ShortRotationPlugin and TweenLite work too smile

Cheers John.


Now hopefully the Away crew can fix the skybox flickering bug.

   

Avatar
Darcey, Moderator
Posted: 08 March 2014 01:54 AM   Total Posts: 209   [ # 3 ]

SkyBox flickering bug appears to be relational to camera.lens.far = 20000;
Large values cause the flicker.

   

Avatar
Darcey, Moderator
Posted: 08 March 2014 01:57 AM   Total Posts: 209   [ # 4 ]

Additional information for the quaternion root:
http://stackoverflow.com/questions/20757240/tweening-a-rotation-with-quaternions

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X