Debug my collision system

Project link:
My last two neurons desperately trying to connect by StarlightStudios

1-sentence description of the issue:
The squares flicker when they touch each other
What do you want your code to do?
Not flicker
What is the code currently doing?
How to recreate:

  1. Swipe right twice

@ShiningStars @CodeHelp
You’d think that this would be easy and it probably is, but I just can’t seem to figure it out


Also please don’t tell me how to fix anything else (as of now) because I think I know a fix I just want to get this fixed first

1 Like

I am making a code that will fix it but please wait a bit hopscotch crashed :(

1 Like

It’s fine! I’ve noticed HS has been crashing sooo much this update

Here it is but it isn’t as good as i wanted it to be because i cant make custom rules

Try doing something similar to up and down also
First time you move right you touch the wall but everything else is fine

1 Like

I’m sorry but this isn’t what I was trying to do, it’s supposed to be for a platformer so it would have to be fluid and smooth but the player just teleports to the destination. I appreciate the help though

1 Like

Hmm maybe this?

1 Like

It still needs to have no delay when moving, and also when it collided with the square it pushes away instead of just touching it

1 Like

I don’t know a quicker way because of frames

1 Like

When Bumps tends to do that. What you’d need to do is cancel the collision before it occurs. It sounds impossible, but it can be done.

1 Like

This is a better way of doing it, and it’s made to work on Player 2.1.1
Proper credit for physics has already been set in the project.

The rules in the collision rule have to stay that way for them to run in only one frame.

The main issue is when bumps on top of the fact you’re making the square move 100 steps without any way of stopping it (as in it’ll try to move it until the block is done running). That’s why the jittering occurs.

Here’s gravity based collision, if you want to check it out (no controls though, but it can easily be added)

Standard X Speed is 8, and pressing the jump button simply sets to Y value to something like 23 (experiment some numbers until you find the one perfect for you).

Ignore the obvious gap between the player and platform. That’s just due to the position of the object. Sometimes there’s a tiny gap, and other times there’s not.

It would be better if you do this in player 1.5.x, but you probably want to be able to use parameters in custom methods, or even the set background color block.


You are a lifesaver thank you!!

1 Like

It has a solution

1 Like

@StarlightStudios has the problem been solved? If so, would you like this clived?

1 Like

Sure that’s fine

1 Like