Search found 141 matches

by zoom
Fri Oct 13, 2017 1:36 am
Forum: General Discussion
Topic: Collision detection bug/inaccuracy?
Replies: 9
Views: 134

Re: Collision detection bug/inaccuracy?

Seems like fixture created by Geometry.createRectangle behaves like Geometry.createCircle. https://github.com/wnbittle/dyn4j/blob/master/src/org/dyn4j/geometry/Geometry.java#L589 There must be something else going on. It would be really helpful if you could put together a junit-test or a simple app...
by zoom
Thu Oct 12, 2017 8:13 am
Forum: General Discussion
Topic: Collision detection bug/inaccuracy?
Replies: 9
Views: 134

Re: Collision detection bug/inaccuracy?

I don't understand the pictures. All I see is a number and some overlap. The larger the overlap the larger the number but where does that number come from?
by zoom
Tue Aug 15, 2017 4:03 am
Forum: Bugs, Enhancements, Feedback
Topic: Pathfinding and Steering
Replies: 3
Views: 475

Re: Pathfinding and Steering

It seems better to keep the physics separate from other concerns and not bolt everything into the dyn4j-jar. On the other hand it would be great if all the java libraries could converge on the same set of 2D/3D-primitives. It gets pretty tiresome to convert one vector2d to another librarys vector2d....
by zoom
Fri Aug 11, 2017 2:27 am
Forum: General Discussion
Topic: Test collision before adding new Body
Replies: 2
Views: 358

Re: Test collision before adding new Body

You can use the family of 'detect' methotds on the world.

http://docs.dyn4j.org/v3.2.4/org/dyn4j/ ... util.List-
by zoom
Tue Jul 11, 2017 11:44 am
Forum: General Discussion
Topic: Gravity Wells or Gravity Points without a Body
Replies: 4
Views: 351

Re: Gravity Wells or Gravity Points without a Body

the world gravity is just a 'global' force that is applied to everything. Think platformer games where you always fall down because gravity. To model planets and such you will have to calculate the effect of gravity yourself and apply it to the bodies between every step of the simulation. One way to...
by zoom
Thu Jun 08, 2017 5:10 am
Forum: General Discussion
Topic: CategoryFilters
Replies: 4
Views: 401

Re: CategoryFilters

assofohdz wrote:The masks you've picked, did you get those by checking out how the numbers are represented binary?

Edit: I guess they are the same as mine in a way, combined by the OR operator.


Yes, they should be similar, it's a bit mask.
by zoom
Wed Jun 07, 2017 11:04 am
Forum: General Discussion
Topic: CategoryFilters
Replies: 4
Views: 401

Re: CategoryFilters

I did something similar and it worked fine for me (although I never finished that game). public class CollisionGroups { /** * Static bodies collides with all bodies except other static bodies. */ public static final CategoryFilter STATIC_BODIES = new CategoryFilter(1, 14); /** * Dynamic bodies colli...
by zoom
Fri May 12, 2017 8:41 am
Forum: General Discussion
Topic: Physics in 3d games?
Replies: 2
Views: 401

Re: Physics in 3d games?

A 3D physics engine :-)

Something like PhysX, Bullet Physics, Torque 3D.
by zoom
Wed Apr 19, 2017 9:26 am
Forum: General Discussion
Topic: Applyforce in the direction (or opposite) of the body
Replies: 3
Views: 522

Re: Applyforce in the direction (or opposite) of the body

I guess (haven't checked) but a body can be moving in only one direction, like if you push a billiard ball it will move in a direction but that is not the same as saying "the front of the car". So a moving body can have a direction but I guess you are more interested in "I want to mov...
by zoom
Wed Apr 19, 2017 7:36 am
Forum: General Discussion
Topic: Applyforce in the direction (or opposite) of the body
Replies: 3
Views: 522

Re: Applyforce in the direction (or opposite) of the body

It boils down to: "The body has a direction and I want the force to be applied in that direction." In dyn4j the body has no direction, that is something your code interprets. So if you decide that "forward" starts out as positive Y your code can build up a force vector like this ...

Go to advanced search