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

#1 2010-03-13 18:39:20

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Fixed Rotational Spot?

I'm creating a 1s-1s 3D maze game engine using a simplified version of  the layering technique that RHY used in his Go Kart Racing project,and it allows you to rotate the maze to get a better view.My problem is that when I rotate the maze (which is a square,for any technical issues),the character sprite doesn't rotate along with it. I've tried several techniques based on division,but I now think that I would need to use trigonometry,which my school has cut out of the pre-algebra curriculum. So,does anyone know how to get the sprite to stay in it's spot?Thanks in advance!(if anyone wants my current demo to see the scripts,just ask)


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#2 2010-03-13 19:24:49

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: Fixed Rotational Spot?

Anyone?


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#3 2010-03-13 19:58:15

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Fixed Rotational Spot?

Yep, trig can probably do the job for you.  Maybe this demo will help:

http://scratch.mit.edu/projects/Paddle2SeeFixIt/930342


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2010-03-13 20:34:18

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: Fixed Rotational Spot?

Almost worked,P2C,but it ended up either pulling the sprite to the opposite side or returning the sprite to X:0 Y:0.


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#5 2010-03-13 20:47:43

chalkmarrow
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: Fixed Rotational Spot?

Paddle's method is definitely the way to do it. You may want to post what you have of the project so it can be looked at.

Offline

 

#6 2010-03-13 20:59:44

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: Fixed Rotational Spot?

I tried.The file's way too large.But basically,I'll restate my needs:I need a dot to move around a map freely,and when the map rotates the dot must stay in the same position on the map.For some reason,paddle's works,but it initially moves the dot to the map's opposite side.


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#7 2010-03-14 08:52:16

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: Fixed Rotational Spot?

Just try to upload without music  smile


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#8 2010-03-14 14:07:31

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: Fixed Rotational Spot?

JSO wrote:

Just try to upload without music  smile

I don't use music in any of my projects,and this is no exception(I just find I can play a game better without ear-splitting explosions).


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#9 2010-03-14 14:12:59

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: Fixed Rotational Spot?

Since my file won't upload,here's a link to a hosting website if anyone wants to help:
http://www.mediafire.com/myfiles.php


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#10 2010-03-14 16:47:17

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: Fixed Rotational Spot?

Brass45 wrote:

Since my file won't upload,here's a link to a hosting website if anyone wants to help:
http://www.mediafire.com/myfiles.php

The link doesn't work... try using the code it gives you when you upload it.


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#11 2010-03-14 16:47:18

Ace-of-Spades
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Fixed Rotational Spot?

Try making a variable do the job (like the fixed things on a scrolling map)


11110010100011010100011010101000100011011011001010111100101000110101000110101010001000110110110010101111001010001101010001101010100010001101101100101011110010100011010100011010101000100011011011001010
110101010010001010101010101010101010101010100110101010010101010010101001101011010101010010101010101

Offline

 

#12 2010-03-14 17:00:04

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: Fixed Rotational Spot?

?No,I need the object(a separate sprite) to rotate along with the maze.
Here's the new link:
http://www.mediafire.com/?izjkydy1mk0

Last edited by Brass45 (2010-03-14 17:01:35)


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#13 2010-03-14 23:11:17

Ace-of-Spades
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Fixed Rotational Spot?

I know that. The variable keeps track of the general position of both sprites.


11110010100011010100011010101000100011011011001010111100101000110101000110101010001000110110110010101111001010001101010001101010100010001101101100101011110010100011010100011010101000100011011011001010
110101010010001010101010101010101010101010100110101010010101010010101001101011010101010010101010101

Offline

 

#14 2010-03-15 06:42:39

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: Fixed Rotational Spot?

Just download the game,and you'll see the problem.


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#15 2010-03-15 10:42:39

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Fixed Rotational Spot?

Maybe you can make a stripped down version of the project that shows the problem but can fit on the site.  Why is it so large anyway?


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#16 2010-03-15 16:55:41

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: Fixed Rotational Spot?

Paddle2See wrote:

Maybe you can make a stripped down version of the project that shows the problem but can fit on the site.  Why is it so large anyway?

I don't know.Let me check the file size...wait,it's only 113kb!But the site won't let me upload it for some reason...


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#17 2010-03-16 15:00:00

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Fixed Rotational Spot?

It was rotating fine, but it wouldn't move while it was rotating.

I tried to made a video which outlines what i mean. But it was incredibaly laggy, so sorry.
It just jumps around the place when turning. And when its not hiding in the circle area, its sitting, but won't move. Its very good though.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#18 2010-03-16 19:35:19

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

Re: Fixed Rotational Spot?

I'll see if I can thin the code a little for ya! I'm good at those sorts of things.


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#19 2010-03-16 19:38:43

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

Re: Fixed Rotational Spot?

I uploaded it as a test, and it worked fine....
http://scratch.mit.edu/projects/cds56/934436

Last edited by cds56 (2010-03-16 19:39:12)


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#20 2010-03-16 22:02:25

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: Fixed Rotational Spot?

Did you even change anything?It still jumps away the exact same way...also,that demo is a little out of date.I updated mine slightly to allow for correct layering(via order of stamping),and I also made it so that the walls shift depending on your X and Y position(at (0,0),it looks like it's completely 2D!).The rotation has me stumped,though...while i'm rambling on,does anyone know how to perform sine/cosine/tangent/etc. with an angle?
EDIT:That demo actually did have correct layering.

Last edited by Brass45 (2010-03-16 22:03:58)


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#21 2010-03-17 06:34:08

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

Re: Fixed Rotational Spot?

I thought you said It couldn't upload?


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#22 2010-03-17 07:09:12

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: Fixed Rotational Spot?

For some reason it wouldn't on mine;it just kept on saying "file too large" even though it was only 100kb!


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#23 2010-03-17 18:20:20

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

Re: Fixed Rotational Spot?

What do you need help with then?


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#24 2010-03-17 18:56:44

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: Fixed Rotational Spot?

Getting it to rotate correctly.I want to be able to rotate the whole stage with the sprite in the same spot.


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#25 2010-03-22 18:33:34

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: Fixed Rotational Spot?

Bump.Can someone please just help me? I gave the download link in the previous page.


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

Board footer