Improve collision

Get help using Construct 2

Post » Thu Apr 16, 2015 7:01 pm

Is there a way two improve collisions? On the example above if you click to spin the cog and make a fast movement the ball doesn't collide with a wall.

Image
B
3
Posts: 2
Reputation: 179

Post » Thu Apr 16, 2015 7:20 pm

No, as long as the speed(distance travelled per unit) is greater than a collision area where the frames can be skipped allowing the collision to not register.
Image ImageImage
B
170
S
50
G
179
Posts: 8,379
Reputation: 113,427

Post » Thu Apr 16, 2015 7:23 pm

newt wrote:No, as long as the speed(distance travelled per unit) is greater than a collision area where the frames can be skipped allowing the collision to not register.



Awww, that's not some good news
B
3
Posts: 2
Reputation: 179

Post » Thu Apr 16, 2015 9:55 pm

@Wololo
Motion is basically object's teleporting from one position to another each frame. The issue is when the cog spins fast the wall is on one side of the object one one frame and the other side on the next.

Solutions to solve this either use:
* math to calculate if the paths of the two objects cross
* or checking positions in between the frames.

Here's a rough idea of the latter:
https://dl.dropboxusercontent.com/u/542 ... tween.capx
B
94
S
33
G
113
Posts: 5,356
Reputation: 73,273


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 41 guests