I'm trying to make something where you can drag a object around a circle and it will snap to the place on the circle below/above it. How could I do this?
Offline
should be moved...
Offline
coolstuff wrote:
Looks like this will better be suited for All About Scratch. Don't fret, I'll move it!
I'm not sure what you mean... Are you talking about something like the arms on my Stickfigure Animator?
No, it's an object that sits on the outer edge of a circle. I want to be able to drag it and have it go to the corresponding point on the circle.
Offline
AtomicBawm3 wrote:
coolstuff wrote:
Looks like this will better be suited for All About Scratch. Don't fret, I'll move it!
I'm not sure what you mean... Are you talking about something like the arms on my Stickfigure Animator?No, it's an object that sits on the outer edge of a circle. I want to be able to drag it and have it go to the corresponding point on the circle.
Hmm... You mean to rotate the circle? Or to drag the circle? Or to drag the dot and have it stay in the radius of the circle?
Offline
coolstuff wrote:
AtomicBawm3 wrote:
coolstuff wrote:
Looks like this will better be suited for All About Scratch. Don't fret, I'll move it!
I'm not sure what you mean... Are you talking about something like the arms on my Stickfigure Animator?No, it's an object that sits on the outer edge of a circle. I want to be able to drag it and have it go to the corresponding point on the circle.
Hmm... You mean to rotate the circle? Or to drag the circle? Or to drag the dot and have it stay in the radius of the circle?
last one.
Offline
AtomicBawm3 wrote:
coolstuff wrote:
AtomicBawm3 wrote:
No, it's an object that sits on the outer edge of a circle. I want to be able to drag it and have it go to the corresponding point on the circle.Hmm... You mean to rotate the circle? Or to drag the circle? Or to drag the dot and have it stay in the radius of the circle?
last one.
I'm working on uploading a project for you. Hang on there for a minute or two.
Offline
coolstuff wrote:
AtomicBawm3 wrote:
coolstuff wrote:
Hmm... You mean to rotate the circle? Or to drag the circle? Or to drag the dot and have it stay in the radius of the circle?last one.
I'm working on uploading a project for you. Hang on there for a minute or two.
Really? Thanks!
Offline
La: http://scratch.mit.edu/projects/coolfixit/1144574. There you go
It uses trigonometry, but I'm afraid there's no other way
Offline
That's okay, I understand it. Actually now I have another problem. Here's the project I'm working on, but it's not exactly working right and I can't figure it out. yeah...
Offline
AtomicBawm3 wrote:
That's okay, I understand it. Actually now I have another problem. Here's the project I'm working on, but it's not exactly working right and I can't figure it out. yeah...
It seems to be working fine for me...
Offline
coolstuff wrote:
AtomicBawm3 wrote:
That's okay, I understand it. Actually now I have another problem. Here's the project I'm working on, but it's not exactly working right and I can't figure it out. yeah...
It seems to be working fine for me...
![]()
If you drag the planet and then try it dragging it to the left, it messes up slightly, then if you drag it to the right, it jumps back to somewhere in between.
Offline
AtomicBawm3 wrote:
coolstuff wrote:
AtomicBawm3 wrote:
That's okay, I understand it. Actually now I have another problem. Here's the project I'm working on, but it's not exactly working right and I can't figure it out. yeah...
It seems to be working fine for me...
![]()
If you drag the planet and then try it dragging it to the left, it messes up slightly, then if you drag it to the right, it jumps back to somewhere in between.
That is strange... What I've found is that if you drag it to the left and then to the right, it actually disappears completely! I'm not entirely sure how to fix that predicament...
Offline
AtomicBawm3 wrote:
Well, the disappearing thing is cuz it hides when it's touching the edge...
Oh, I see then.
It could be because there's different formulas for X and Y positions for when the mouse is down and for when it's not.
Offline
coolstuff wrote:
AtomicBawm3 wrote:
Well, the disappearing thing is cuz it hides when it's touching the edge...
Oh, I see then.
It could be because there's different formulas for X and Y positions for when the mouse is down and for when it's not.
What do you mean? It only needs to move when the mouse is down and it does fine when the planet is rotated. It only messes up after the planet is rotated and then you try to drag it.
Offline
AtomicBawm3 wrote:
coolstuff wrote:
AtomicBawm3 wrote:
Well, the disappearing thing is cuz it hides when it's touching the edge...
Oh, I see then.
It could be because there's different formulas for X and Y positions for when the mouse is down and for when it's not.What do you mean? It only needs to move when the mouse is down and it does fine when the planet is rotated. It only messes up after the planet is rotated and then you try to drag it.
Maybe you and I are thinking of different things.
Still, I'm having some difficulties with the hiding sign... Not only does it hide when it hits the edge, but it also hides for no apparently reason when I drag it...
Offline
coolstuff wrote:
AtomicBawm3 wrote:
coolstuff wrote:
Oh, I see then.
It could be because there's different formulas for X and Y positions for when the mouse is down and for when it's not.What do you mean? It only needs to move when the mouse is down and it does fine when the planet is rotated. It only messes up after the planet is rotated and then you try to drag it.
Maybe you and I are thinking of different things.
Still, I'm having some difficulties with the hiding sign... Not only does it hide when it hits the edge, but it also hides for no apparently reason when I drag it...
Really? You mean after you drop it? Cuz that's the positioning problem at work...
Ok, now it no longer hides when touching the edge.
Last edited by AtomicBawm3 (2010-06-22 22:31:33)
Offline
AtomicBawm3 wrote:
coolstuff wrote:
AtomicBawm3 wrote:
What do you mean? It only needs to move when the mouse is down and it does fine when the planet is rotated. It only messes up after the planet is rotated and then you try to drag it.Maybe you and I are thinking of different things.
Still, I'm having some difficulties with the hiding sign... Not only does it hide when it hits the edge, but it also hides for no apparently reason when I drag it...Really? You mean after you drop it? Cuz that's the positioning problem at work...
Yeah, I move it left, I move it right, it disappears after the mouse is down.
I can remake the project exactly as you made it but with better scripting tomorrow, if you'd like. Guaranteed bug-free. I don't really like looking through other people's scripting, though...
Offline
coolstuff wrote:
AtomicBawm3 wrote:
coolstuff wrote:
Maybe you and I are thinking of different things.
Still, I'm having some difficulties with the hiding sign... Not only does it hide when it hits the edge, but it also hides for no apparently reason when I drag it...Really? You mean after you drop it? Cuz that's the positioning problem at work...
Yeah, I move it left, I move it right, it disappears after the mouse is down.
I can remake the project exactly as you made it but with better scripting tomorrow, if you'd like. Guaranteed bug-free. I don't really like looking through other people's scripting, though...
I fixed the hiding thing, now it's just the jumping side to side...
Offline
AtomicBawm3 wrote:
coolstuff wrote:
AtomicBawm3 wrote:
Really? You mean after you drop it? Cuz that's the positioning problem at work...Yeah, I move it left, I move it right, it disappears after the mouse is down.
I can remake the project exactly as you made it but with better scripting tomorrow, if you'd like. Guaranteed bug-free. I don't really like looking through other people's scripting, though...I fixed the hiding thing, now it's just the jumping side to side...
Well, I can help more tomorrow, but I'm going to have to turn in for the night.
Good luck with your project!
Offline
coolstuff wrote:
AtomicBawm3 wrote:
coolstuff wrote:
Yeah, I move it left, I move it right, it disappears after the mouse is down.
I can remake the project exactly as you made it but with better scripting tomorrow, if you'd like. Guaranteed bug-free. I don't really like looking through other people's scripting, though...I fixed the hiding thing, now it's just the jumping side to side...
Well, I can help more tomorrow, but I'm going to have to turn in for the night.
Good luck with your project!
Thanks and Thanks.
Offline
There's something off with the sign, cuz I'm trying it now and I took out the turn the planet thing and it's still jumping around.
Offline
wait I think I got it...
YEESSS! I got it!
Last edited by AtomicBawm3 (2010-06-23 12:58:42)
Offline