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)
Offline
Yep, trig can probably do the job for you. Maybe this demo will help:
http://scratch.mit.edu/projects/Paddle2SeeFixIt/930342
Offline
Almost worked,P2C,but it ended up either pulling the sprite to the opposite side or returning the sprite to X:0 Y:0.
Offline
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
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.
Offline
JSO wrote:
Just try to upload without music
![]()
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).
Offline
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
Offline
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.
Offline
Try making a variable do the job (like the fixed things on a scrolling map)
Offline
?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)
Offline
I know that. The variable keeps track of the general position of both sprites.
Offline
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?
Offline
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...
Offline
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.
Offline
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)
Offline
For some reason it wouldn't on mine;it just kept on saying "file too large" even though it was only 100kb!
Offline
Getting it to rotate correctly.I want to be able to rotate the whole stage with the sprite in the same spot.
Offline
Bump.Can someone please just help me? I gave the download link in the previous page.
Offline