Bouncing ball with physics

Discussion and feedback on Construct 2

Post » Wed Nov 18, 2015 8:25 pm

I'm trying to make bouncing ball with physics behaviour. But I have problem with bouncing angle.

In situation like this:
Image
ball should bounce like this:
Image
but it bounces like this:
Image

Why this ball bounces in this strange angle?

Live preview (shoot the ball like in angry birds):
https://dl.dropboxusercontent.com/u/176 ... index.html

CAPX:
https://dl.dropboxusercontent.com/u/176 ... gball.capx
B
55
S
14
G
10
Posts: 287
Reputation: 7,677

Post » Wed Nov 18, 2015 8:40 pm

The ball has prevent rotation set to Yes, so when the ball bounces it does not rotate and so friction causes its velocityX to reduce to zero.
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,255
Reputation: 46,484

Post » Wed Nov 18, 2015 11:35 pm

But if I set the prevent rotation to No - the ball rotates and i'd like to avoid that. Ball should have always angle of it's movement.
B
55
S
14
G
10
Posts: 287
Reputation: 7,677

Post » Thu Nov 19, 2015 12:52 am

In that case, pin a non-rotating sprite on top of an invisible ball physics object.
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,255
Reputation: 46,484


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 16 guests