Detecting cube faces

2 messages Options
Embed this post
Permalink
4n6

Detecting cube faces

Reply Threaded More More options
Print post
Permalink
I am going to do a die rolling on the floor. Is there a way to detect when the bottom of the die is touching the floor? Each time the die rolls the bottom is changing, a new part of the die is touching the floor. Is there a quick detection instead of trying to make an index of the faces?

Thanks.

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
dsdsdsdsd

Re: Detecting cube faces

Reply Threaded More More options
Print post
Permalink
4n6,

about a year ago I played with one of the physics engines ( http://muzerly.googlepages.com/ ) and basically he used vertex positions of an object to determine where an object was in space; the point being that the definitive feature of an object is really it's geometry;

based on this you would need to index each cube side, and the vertices, or the normals ( probably better ); and when a die roll has completed query each face for it's facing direction;

or you could simply query the cube's rotation properties, but for this you would need to be comfortable with polar coordinates I think, and still you would need to index polar values ... [ [ 0,0,0] : 1 ] , [ 0,0,90] : 5 ] , ... ] which would be cumbersome;