Physics behavior collision

For questions about using Classic.

Post » Sun Aug 14, 2011 11:08 am

Hello,

My goal is to have a ball slide on the ground, in fact, and not bounce, or bounce a bit, then roll/slide.

1) When I apply "ball" behaviour, it works, but with too many bounces. Is there a way of controlling this?
2) When I apply just "physics" behaviour, it falls, but won't interact (collide) with walls and other objects. This is true whether the "ball" behaviour is applied or not.


I must be doing something wrong. Any ideas?
B
1
G
1
Posts: 8
Reputation: 491

Post » Sun Aug 14, 2011 1:04 pm

You could use:

+ MouseKeyboard: On key Right arrow pressed
-> ball: Add force (ball[Physics].VelocityX+240, ball[Physics].VelocityY-240)

+ MouseKeyboard: On key Left arrow pressed
-> ball: Add force (ball[Physics].VelocityX-240, ball[Physics].VelocityY-240)

1, If your ball is using 'Physics', you need to apply the same behaviour to the floor(and/or walls)...or they wont collide.
2, Also set the floor to 'Imovable' to stop it moving.
3, If your getting too much bounce, just playaround with the values.


Example cap

Good luckchrisbrobs2011-08-14 13:04:50
B
19
S
6
G
7
Posts: 1,206
Reputation: 7,300


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests