This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#76 2009-12-31 11:21:50

AddZero
Scratcher
Registered: 2007-08-11
Posts: 100+

Re: Challenge for RHY!

RHY you can do it! Peer pressure!  smile

I think it's cool to have challenges like this.  I hope to see more, I may want to join.

I thought about this problem too.

To simplify, the cube can rotate up and down (y pitch) and side to side (z yaw) (but not x roll)

Have 9 circle sprites for rendering the top and bottom stickers, depending what side we're viewing.
each circle sprite is red, but can change its color depending on what sticker it is representing.
Each circle sprite has several red costumes, varying from a circle to a horizontal ellipse to almost horizontal line depending on the y pitch of the cube.

The sides are the same except there are two sets of 9 colored sprites, and their costumes vary from circles to vertical ellipse to almost line- depending on the (z yaw) rotation.
they switch sides depending on the rotation, set one renders sides 1 and 3, set two renders sides 2 and 4. depending what side is facing the camera.
(I made a project sort of like this a while back: http://scratch.mit.edu/projects/AddZero/177058 )

An advantage to having sprites this way is that you can easily know what sprite the mouse is over.  then you can sense clicking and dragging. (I made that detection in my solitaire project. not hard. )and know if it's dragging up, down left or right- to know what direction to rotate the row/column.

that needs to be rotated.  and if the mouse is on the edge of the screen and not touching a circle sprite, and clicking and dragging, it's assumed the user is trying to rotate the entire cube.

Then just have a sprite that draws the the outlines of the cube.  it gets a bit tricker if you want to animate the sliding.

Last edited by AddZero (2009-12-31 11:49:14)


http://scratch.mit.edu/static/icons/buddy/524717_med.png?t=2010-06-15+09%3A48%3A36

Offline

 

#77 2009-12-31 14:35:47

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Challenge for RHY!

Peer pressure...  lol


Hai.

Offline

 

#78 2009-12-31 15:00:46

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: Challenge for RHY!

Come on, RHY! Are you chicken?

Offline

 

#79 2009-12-31 15:18:33

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Challenge for RHY!

http://www.netstate.com/states/symb/birds/images/de_blue_hen_chicken.jpg

Offline

 

#80 2009-12-31 15:32:02

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Challenge for RHY!

Do you look like that?  lol


Hai.

Offline

 

#81 2009-12-31 15:55:53

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Challenge for RHY!

fg123 wrote:

Do I look like that?  lol

Yes.

Offline

 

#82 2009-12-31 15:58:21

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Challenge for RHY!

RHY3756547 wrote:

fg123 wrote:

Do you look like that?  lol

Yes.

I thought so.


Hai.

Offline

 

#83 2009-12-31 21:14:47

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Challenge for RHY!

ROFL rhy is a chicken .


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#84 2009-12-31 22:49:40

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Challenge for RHY!

Yeah. That's what he get's for changing a quote.  big_smile


Hai.

Offline

 

Board footer