Link to .capx file (required!):
Steps to reproduce:
1. Left click to restart layout
2. Use the mouse to move the blue square
3. Try and cross the yellow line and hit the red square
4. It should not be possible to move the red square
5. Move slowly so the blue square is still in contact with the yellow line as it touches the red square and it seems to still have collisions enabled most the time.
Sometimes (Not sure if it is due to the speed / random) it is possible to still make contact and move the red square. The counter in the top right still works (Says collisions should be disabled) but they still work.
Blue square should pass through the red one. As soon as the position of the blue square is further to the right than the yellow line, collisions are disabled and never turn back on unto restarting the layout.
Firefox: not installed
Internet Explorer: yes
Operating system & service pack:
Construct 2 version:
r124 beta. Although I have tried it on the 123 version before I updated and it was the same.
Many thanks. Maybe it is a misunderstanding I have with physics properties as I am new to construct.
Closing as not a bug: you need to make sure collisions are disabled further in advance. If the objects are already touching when you disable collisions, the existing collision is not disabled. (This is how Box2D works; we can't change it.) There seems to only be a few pixels distance between when collisions are disabled and the edge of the red object, so if you move the mouse fast you can make it collide before the collisions are disabled.
Develop games in your browser. Powerful, performant & highly capable.
I seem to disagree although hopefully you can prove me wrong and I can fix my game. I have moved the squares further past the line which disables collisions. I can still replicate this 'bug'. Even if I pause the blue square on the line (and hence collisions should be disabled from then on) I can wait, and sometimes move and make contact with the red square. I have not worked out what makes it leave collisions enabled \ disabled. Maybe it is to do with slowing down / keeping same velocity?
I have uploaded a video clip to show this:
Please let me know what you think \ any ways around this.
I've been experimenting with this to try and figure what is causing this strange behavior. I have notice that if when I turn the collisions off, I also set the speed to 0 (for both x and y) then I cannot make contact past the line. You also cannot notice this as the square is controlled by the mouse, so it seems to be a fix for this issue. I would however like to try and fix this for when the objects are moving as bouncing balls, so using this way around wouldn't work as I'd stop the balls completely.
I think the problem is 'disable collisions' takes a tick to take effect. If I move the 'disable collisions' action to 'Start of Layout' I definitely can't reproduce the problem. I think this has to be closed as it's all happening inside the physics engine, and you can't disable collisions just before actually colliding, since it hasn't updated yet.