Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object beyond the edge. #2

Closed
Rynaro opened this issue Feb 26, 2014 · 6 comments
Closed

Object beyond the edge. #2

Rynaro opened this issue Feb 26, 2014 · 6 comments

Comments

@Rynaro
Copy link

Rynaro commented Feb 26, 2014

If only I grab an object and drag it to a position that he is above the other, and start to move the mouse horizontally on the intention to make the object colliding with the walls. At some point the object beyond the wall and disappears.
And the line connecting the cursor and the object is still connected to it, and dissapears only after a click on any screen.

@liabru
Copy link
Owner

liabru commented Feb 26, 2014

Did the object go outside of the visible canvas area?

Currently Matter doesn't simulate anything that falls outside of the world bounds.
See the code here.

By default the world bounds are set to the same size as the canvas (800x600).

You can make the world bounds bigger when you create a world:

Matter.World.create({ 
    bounds: { 
        min: { x: 0, y: 0 }, 
        max: { x: 800, y: 600 } 
    }
});

The other issue is that small objects can pass through other objects given enough force / speed.
This is due to the current lack of continuous collision detection (may implement later).

Does this help, or did you mean something else?

@cipherself
Copy link

out_bounds
Example of out of bounds object

@camara90100
Copy link

selection_006

@liabru
Copy link
Owner

liabru commented Feb 27, 2014

Thanks for the screenshots.

Can somebody give me the steps to reproduce this?

Did you just throw an object side ways really quickly? I managed to do this on the friction demo.
Again, since there is currently no CCD, really fast objects can pass through other objects.

@camara90100
Copy link

It worked for me on all demos, grab the object and keep moving it horizontally against the vertical walls, as you move the mouse faster and further from the object, the object will gain velocity ( I think! I'm not very good in physics) and move further away from the courser till at some point will break through the vertical walls and disappear from the screen but the green line stays connected to the object till you let go and unclick. I hope that helps.

@liabru
Copy link
Owner

liabru commented Feb 27, 2014

Thanks guys, I know what this is now.

I've opened a new issue discussing the solution to this, so I'll close this one, cheers

@liabru liabru closed this as completed Feb 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants