How do I use Custom Movement for a perfect collision?

Get help using Construct 2

Post » Sat Feb 06, 2016 12:43 am

Helo everybody! I started using construct 2 just a few months ago and i loved it. This is my first post here, i had problems before but i found the solutions in this forum. In this case I did found a solution but It did not work :(
The problem I have is an issue with the collision detection using Custom movement behavior
I have a grid of 5x5 blocks, which spawn in a certain point at a high vertical speed (1500px/dt). It has a rule to stop falling when it collides with another block, and it does work, BUT at low speeds like 500px/dt. When i set it to 1500px, this happens
Image
When it should look like this
Image
I tried using stepping mode "linear" and "pixels per step" 1, but it still does not work
Also i found a post from an user called "Ramones" Who uses the condition "on custom movement step" with the overlap condition. It doesnt work for me and i dont know why :(
Thank you for taking a moment to help me
Here is the ripped project file http://s000.tinyupload.com/?file_id=50344323361830757989
B
11
S
1
Posts: 15
Reputation: 507

Post » Sat Feb 06, 2016 7:28 pm

OK i dont know why but changing the sprite size to 100 and using When not colliding with blocks and ground Change y to +10, it works okay, but with the original size of 128 it does not work.. weird
B
11
S
1
Posts: 15
Reputation: 507

Post » Sat Feb 06, 2016 10:48 pm

Hi,
I know this doesn't answer your question directly but I've found it's tricky to get that working good with collisions.

One idea i've tried before that works well is to instead just keep track of how far each block should move.
https://dl.dropboxusercontent.com/u/542 ... _drop.capx
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

Post » Sun Feb 07, 2016 12:20 am

Roj0, thank your for your help. I worked it out 2 minutes ago, using a "change.Y to +16". It s importart that the Delta Y has to be a multiple of the Y size of the object you are moving, I saw your solution, it works good as well, even with highs speeds. I m going to save it when i have to do something with custom move behavior again. Thank you!
B
11
S
1
Posts: 15
Reputation: 507


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests