Hi Rob,
Thanks for the advice, unfortunatly, it doesn't fit with my animation
method:
cube.rotationX*=5;
cube.rotationX+=targetX;
cube.rotationX/=6;
This code relies on being able to access the correct rotational value of the
cube about its specified axis as well as applying the rotation.
The rebuilding of the cube occurs in a different implementation, where the
cube is only allowed to rotate 90 degrees on the X or Y axis before being
destroyed and rebuilt. This new method means I don't have to deal with the
euler problem at all, but seems to keep the used cubes in memory, even
though I'm not referencing thgem any more.
This project is a simple prototype and is due for demonstration on thursday,
so I'm not too bothered about any 'performance niggles' as they can be
ironed out during the development phase.
Cheers,
Stuart
On Mon, Dec 8, 2008 at 4:55 PM, Rob Bateman <[EMAIL PROTECTED]> wrote:
> Hey Stuart
>
> sorry to hear about your euler angle woes. Have you tried rotating around
> an axis, rather than using eulers? something like:
>
>
> cube.rotate(new Number3D( 0, 0, 1), 90); //a z axis rotation
>
>
> cube.rotate(new Number3D( 1, 0, 0), 90); //an x axis rotation
>
>
> cube.rotate(new Number3D( 0, 1, 0), 90); //a y axis rotation
>
>
> this should avoid the dreaded 'gimbal lock' problem, and also stop you
> having to keep re-creating the cube, which is inconvenient to say the least
> ;)
>
> atb
>
> Rob
>
>
>
> On Fri, Dec 5, 2008 at 4:25 PM, Stuart Kemp <[EMAIL PROTECTED]> wrote:
>
>> The current solution is to build a new cube for each transition, and only
>> apply the faces the user will see to the front and top/bottom/left/right
>> depending on the rotation of course.
>>
>> From a user-control point of view this is working almost perfectly, and my
>> only problem is that the actual rotation of the cube in the users mind
>> doesn't always match that of my fake cube, but thats an issue with my lookup
>> table, and I know how to fixi it.
>>
>> The only other issue it suffers from is that the garbage collection
>> doesn't seem to remove the cubes I discard from the scene, and the framerate
>> suffers after just a few transitions. I'm using scene.removeChild() to drop
>> the cube, and according to Flash's help, that should call the garbage
>> collection, but it doesn't seem to.
>>
>> However, this is just for a prototype, so unless theres a simple answer to
>> this problem, I'm probably going to leave it as is.
>>
>>
>> On Fri, Dec 5, 2008 at 5:10 AM, Makc <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> On Fri, Dec 5, 2008 at 2:59 PM, Stuart Kemp <[EMAIL PROTECTED]> wrote:
>>> > My
>>> > current solution is so close to the answer,
>>>
>>> and what is it, btw?
>>>
>>
>>
>
>
> --
> Rob Bateman
> Flash Development & Consultancy
>
> [EMAIL PROTECTED]
> www.infiniteturtles.co.uk
> www.away3d.com
>