one object following another

Get help using Construct 2

Post » Fri Nov 02, 2012 5:03 pm

I have seem some nice snake games posted, but the movement was only horizontal or vertical.

Is there an easy way to "follow" an object, e.g. a snake body segment, to the segment before it (or the head). Then the app just needs to move the head. The pin behavior does not work in the required way, it would need something like a "follow" behavior to allow segment articulation.

Also, how would one approach the head movement, assuming the head should turn towards the cursor or finger touch. It should not jump to face the finger, but slowly turn in that direction. Is there any way to do this without trigonometry & small incremental changes?

Doing the Trig is straight forward enough, I was just wandering if there was any support for this time of movement built in.

C2 doesn't seem to have any tweeting, only absolute movements.

Thanks for any ideas or strategies.
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Fri Nov 02, 2012 5:12 pm

https://dl.dropbox.com/u/666516/pinbehavior.capx
Several different ways to do it, sin/ cos would give you the most control.newt2012-11-02 17:27:20
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, mjj1990 and 9 guests