# How do I snake mouvement like arrow game ?

Get help using Construct 2

### » Thu Jul 02, 2015 6:24 pm

To imitate that motion, I would find the angle of the arrow, and have the following pieces attempt to align with a position that extends backwards from the current angle.
B
49
S
23
G
66
Posts: 1,151
Reputation: 39,103

### » Thu Jul 02, 2015 6:49 pm

Prominent wrote:To imitate that motion, I would find the angle of the arrow, and have the following pieces attempt to align with a position that extends backwards from the current angle.

i dont understand at all what you say !!!
that make me confused that simple mouvement like that ... and i dont find it
B
50
S
17
G
8
Posts: 816
Reputation: 8,579

### » Thu Jul 02, 2015 6:57 pm

You could also use the cosine of the angle to determine the speed at which the arrow moves, and just control the angle of the arrow.

matrixreal wrote:
Prominent wrote:To imitate that motion, I would find the angle of the arrow, and have the following pieces attempt to align with a position that extends backwards from the current angle.

i dont understand at all what you say !!!
that make me confused that simple mouvement like that ... and i dont find it

What part don't you understand?
B
49
S
23
G
66
Posts: 1,151
Reputation: 39,103

### » Thu Jul 02, 2015 11:19 pm

okay, I had a go at trying to improve it..
It's not perfect, but might help a bit..
I don't have much time to spend on it, so maybe someone else can improve it, or you can figure the rest out yourself?..
http://www.filedropper.com/newsnake2
B
49
S
23
G
66
Posts: 1,151
Reputation: 39,103

### » Fri Jul 03, 2015 1:51 am

Prominent wrote:okay, I had a go at trying to improve it..
It's not perfect, but might help a bit..
I don't have much time to spend on it, so maybe someone else can improve it, or you can figure the rest out yourself?..
http://www.filedropper.com/newsnake2

thanks
the movement of the snake is perfect but the segment need a lot of improvement
any way thanks
B
50
S
17
G
8
Posts: 816
Reputation: 8,579

### » Fri Jul 03, 2015 4:05 am

FUnny enough, seems I found near correct equation for rope pin movement:
https://dl.dropboxusercontent.com/u/659 ... _rope.capx

Still not perfect needs some work though.
B
123
S
54
G
24
Posts: 794
Reputation: 24,042

### » Fri Jul 03, 2015 4:21 am

@alextro
thanks a lot
need more work the segment doesnt follow the snake as good
but thanks
B
50
S
17
G
8
Posts: 816
Reputation: 8,579

### » Fri Jul 03, 2015 9:24 am

Kinda working with simple approach and without pin behaviour. You can modify the rest to match your needs

source file: https://dl.dropboxusercontent.com/u/659 ... snake.capx
B
123
S
54
G
24
Posts: 794
Reputation: 24,042

### » Fri Jul 03, 2015 7:43 pm

alextro wrote:Kinda working with simple approach and without pin behaviour. You can modify the rest to match your needs

source file: https://dl.dropboxusercontent.com/u/659 ... snake.capx

thats okay
but what part of code that make segment follow the head of the snake ?
B
50
S
17
G
8
Posts: 816
Reputation: 8,579

### » Fri Jul 03, 2015 8:59 pm

You mean the straw like segment or the rounded one? The basic idea is to utilize spawning "dots" as head's traces.

B
123
S
54
G
24
Posts: 794
Reputation: 24,042

PreviousNext