How do I snake mouvement like arrow game ?

Get help using Construct 2

Post » 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
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » 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
46
S
16
G
8
Posts: 800
Reputation: 8,347

Post » 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
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » 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
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » 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
46
S
16
G
8
Posts: 800
Reputation: 8,347

Post » 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.
ImageImage
B
114
S
51
G
24
Posts: 790
Reputation: 23,480

Post » 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
46
S
16
G
8
Posts: 800
Reputation: 8,347

Post » 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

Image

source file: https://dl.dropboxusercontent.com/u/659 ... snake.capx
ImageImage
B
114
S
51
G
24
Posts: 790
Reputation: 23,480

Post » 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

Image

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
46
S
16
G
8
Posts: 800
Reputation: 8,347

Post » 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.

Image
ImageImage
B
114
S
51
G
24
Posts: 790
Reputation: 23,480

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: draiza and 7 guests