How do I make movement for a fish that jumps?

Get help using Construct 2

Post » Fri May 27, 2016 11:16 am

I tried multiple things now and I just can't get it to work

How do I make a fish hunt the player?

Lets say I have a platformer.

How do I make the movement on the fish so it tracks the player, sets position below the player, then makes a "realistic" fish jump movement in a curve then it falls down to the water below (and goes invisible again) then repeats after a few seconds.

I tried the most movement options, but I just can't get this to work, is it supposed to be car movement (because of the curve?)

Tried to search the forum for "Fish Behavior, fish jumps, curved jumps, fish" but coulden't find anything

No idea, any help would be greatly appreciated
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Sat May 28, 2016 11:29 am

Tried again for a few hours, not sure if im just dumb right now
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Sat May 28, 2016 11:39 am

Look up sine behavior because thats what your going to need.
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 681
Reputation: 16,613

Post » Sat May 28, 2016 11:51 am

@Triforce

Try Bullet behavior, i use it in this game for the crickets and i think works for your case: http://tinyurl.com/hnf7wmf
B
19
S
6
G
2
Posts: 256
Reputation: 2,640

Post » Sat May 28, 2016 11:57 am

Josek5494 wrote:@Triforce

Try Bullet behavior, i use it in this game for the crickets and i think works for your case: http://tinyurl.com/hnf7wmf


@Josek5494
Downloaded and tested, yeah that's what im looking for, do you only use bullet behavior? (+Physics?)
Last edited by Triforce on Sat May 28, 2016 12:05 pm, edited 1 time in total.
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Sat May 28, 2016 12:04 pm

PixelPower wrote:Look up sine behavior because thats what your going to need.


How do you think it would look with Sine?

one going Horizontal and one vertical? (This makes it go Diagonal)

I mean

Image

That works sure, looks like a fish jumping but it also goes backwards then,
Last edited by Triforce on Sat May 28, 2016 12:09 pm, edited 1 time in total.
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Sat May 28, 2016 12:08 pm

@Triforce
Only bullet behavior. First set the acceleration and speed values. Then you only have to spawn your fish in the water, set the angle correctly (make sure the head of the fish is towards the motion direction to make the movement reallistic) and the fish will jump out!
B
19
S
6
G
2
Posts: 256
Reputation: 2,640

Post » Sat May 28, 2016 1:35 pm

Triforce wrote:
PixelPower wrote:Look up sine behavior because thats what your going to need.


How do you think it would look with Sine?

one going Horizontal and one vertical? (This makes it go Diagonal)

I mean

Image

That works sure, looks like a fish jumping but it also goes backwards then,


That's why i use bullet, because when the fish jumps, and then go again into the water, it keeps going down till is out of the layout. In that moment you can check if object is out and destroy it, avoiding any type of trouble.
B
19
S
6
G
2
Posts: 256
Reputation: 2,640

Post » Sat May 28, 2016 3:28 pm

@Triforce @Josek5494 Yeah your right I didn't think it through. If you used sine then when the fish landed in the water you would have to reset its position through code, which isn't optimal. Bullet behavior is a lot better option indeed.
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 681
Reputation: 16,613


Return to How do I....?

Who is online

Users browsing this forum: duke2704, sebrosen and 28 guests