How to make a sprite move in half circles?

Get help using Construct 2

Post » Wed Sep 16, 2015 9:29 am

The title explains it all.
B
12
S
2
Posts: 267
Reputation: 1,344

Post » Wed Sep 16, 2015 11:05 am

It actually doesn't..

What do you want to happen at the end of the half a circle?
Should the sprite slowdown and speed up or just change direction while keeping speed?
I guess a little fooling around with the sine behaviour could do the trick..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Sep 16, 2015 11:34 am

You could ofcourse also just program it yourself by setting the sprite to the center of the circle and adding a certain number to the angle and moving the sprite the radius of the circle every tick..

https://dl.dropboxusercontent.com/u/485 ... ement.capx
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Sep 16, 2015 2:17 pm

LittleStain wrote:It actually doesn't..

What do you want to happen at the end of the half a circle?
Should the sprite slowdown and speed up or just change direction while keeping speed?
I guess a little fooling around with the sine behaviour could do the trick..



I want the sprite to turn when it has moved a half circle and move a half circle to the other direction. If you don't know what i mean whit a half circle imagine a rainbows shape. I know that i am probably going to use the Sine behavior i just want to know which offsetts i should use. I know how to make sprite move in a full circle but not in a half circle. Again i want the sprite to move left and rigth in a half circle.
B
12
S
2
Posts: 267
Reputation: 1,344

Post » Wed Sep 16, 2015 2:23 pm

Calfuso wrote:
LittleStain wrote:It actually doesn't..

What do you want to happen at the end of the half a circle?
Should the sprite slowdown and speed up or just change direction while keeping speed?
I guess a little fooling around with the sine behaviour could do the trick..



I want the sprite to turn when it moved a half circle and move a half circle to the other direction. If you don't know what i mean whit a half circle image a rainbows shape. I know that i am probably going to use the Sine behavior i just want to know which offsetts i should use. I know how to make sprite a full circle but not in ahalf circle. Again i want the sprite to move left and rigth in a half circle.


Did you download the capx I linked?

Doing it with sine behaviour you would need a horizontal and a vertical one

make the vertical one half the period of the horizontal and have it start at 1/4 of the period
make the horizontal a little more than twice the magnitude of the vertical and you're done..

You could have fiddled with the numbers yourself, offcourse..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Sep 16, 2015 3:41 pm

LittleStain wrote:
Calfuso wrote:
LittleStain wrote:It actually doesn't..

What do you want to happen at the end of the half a circle?
Should the sprite slowdown and speed up or just change direction while keeping speed?
I guess a little fooling around with the sine behaviour could do the trick..



I want the sprite to turn when it moved a half circle and move a half circle to the other direction. If you don't know what i mean whit a half circle image a rainbows shape. I know that i am probably going to use the Sine behavior i just want to know which offsetts i should use. I know how to make sprite a full circle but not in ahalf circle. Again i want the sprite to move left and rigth in a half circle.


Did you download the capx I linked?

Doing it with sine behaviour you would need a horizontal and a vertical one

make the vertical one half the period of the horizontal and have it start at 1/4 of the period
make the horizontal a little more than twice the magnitude of the vertical and you're done..

You could have fiddled with the numbers yourself, offcourse..[/quote


It works now. Solved.
B
12
S
2
Posts: 267
Reputation: 1,344

Post » Wed Sep 16, 2015 3:41 pm

No need to thank me, glad I could help!!
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests