Search found 145 matches

by zoom
Sat Nov 19, 2016 3:02 pm
Forum: Bugs, Enhancements, Feedback
Topic: World.update gets stuck
Replies: 15
Views: 6431

Re: World.update gets stuck

You really should look into JXM and JConsole (or JVisualVM or similar). They are invaluable in these scenarios. One thing that would fit the symptom (but it can of course be something else) is that you had to small max heap (-Xmx) meaning that as memory need increased the JVM spent more and more tim...
by zoom
Thu Nov 10, 2016 9:58 am
Forum: General Discussion
Topic: How to use dyn4j for collisions without physics
Replies: 27
Views: 8650

Re: How to use dyn4j for collisions without physics

It says so in the javadoc

A BroadphaseDetector should quickly determine the pairs of Collidables and Fixtures that possibly intersect.
by zoom
Fri Oct 28, 2016 12:27 pm
Forum: General Discussion
Topic: How to use dyn4j for collisions without physics
Replies: 27
Views: 8650

Re: How to use dyn4j for collisions without physics

So the reolver will figure out all collisions that is happening. Then it will call the listener. If you remove a body in the listener the collisions have all been calucalted. I would expect the collisions to stop for that body in the next step of the physics. So what do you observe, does the collion...
by zoom
Tue Oct 25, 2016 1:23 pm
Forum: General Discussion
Topic: How to use dyn4j for collisions without physics
Replies: 27
Views: 8650

Re: How to use dyn4j for collisions without physics

2) Dyn4J has a SweepLine and an EarClipping decomposer. I use it to take an arbitrary polygon (not always convex) and decompose into triangles which I then render. Like so: Triangulator decomposer = new SweepLine(); Vector2[] points = ... final List<Triangle> triangles = decomposer.triangulate(point...
by zoom
Mon Oct 24, 2016 1:16 pm
Forum: General Discussion
Topic: How to use dyn4j for collisions without physics
Replies: 27
Views: 8650

Re: How to use dyn4j for collisions without physics

You should seriously consider the second option. That is: take your spaceship, attach it via a motor joint to a 'kinematic'-object (I'll call it a control-object). Move and rotate the control-object. Collisions should work for the space ship but you have control over where it goes and rotates. I've ...
by zoom
Mon Oct 24, 2016 10:29 am
Forum: General Discussion
Topic: Concave Shapes "impossible"?
Replies: 9
Views: 4555

Re: Concave Shapes "impossible"?

If you get 130 fps with that many polygons then it isn't a performance problem (I guess). I've had problems with other physics simulations when the triangles becomes to thin (or degenerate) but if you don't see that then congratulations. Dyn4J really is an excellent piece of code :-)
by zoom
Sun Oct 23, 2016 2:55 am
Forum: General Discussion
Topic: Concave Shapes "impossible"?
Replies: 9
Views: 4555

Re: Concave Shapes "impossible"?

Just throwing some random ideas here but personally I would reconsider using raster images to model the table. I would probably look into creating/finding an editor that can draw simpler shapes like circles and boxes to keep the number of triangles down. Especially triangles that are very thin. Then...
by zoom
Tue Oct 04, 2016 10:39 am
Forum: General Discussion
Topic: How to make a fixed wall and bodies hit on that rebounds
Replies: 7
Views: 2944

Re: How to make a fixed wall and bodies hit on that rebounds

I was just trying out the code myself, I was also looking at the scale of the simulation but I wasn't near a solution :-) One thing I sometimes do is to scale everything up. Even if a real carrom is small and light you could set it to weight 1 kg and scale the impulse up, superman playing :-) This i...
by zoom
Mon Sep 26, 2016 1:41 pm
Forum: General Discussion
Topic: How to make a fixed wall and bodies hit on that rebounds
Replies: 7
Views: 2944

Re: How to make a fixed wall and bodies hit on that rebounds

You can upload the video to youtube or similar and post the link. Also, if you want quick help you need to show code. It is very hard to debug code thatyou can not see ;)
by zoom
Thu Jul 07, 2016 2:34 am
Forum: Bugs, Enhancements, Feedback
Topic: Different experience between different machines
Replies: 3
Views: 1983

Re: Different experience between different machines

Are you actually running the samples you linked? It sounded like you had written code yourself.

Go to advanced search