Search found 145 matches

by zoom
Fri Jun 17, 2016 2:50 am
Forum: General Discussion
Topic: Mouse gesture/Shape recognition demo based on dyn4j
Replies: 4
Views: 3073

Re: Mouse gesture/Shape recognition demo based on dyn4j

That was a really cool demo
by zoom
Wed May 18, 2016 4:30 pm
Forum: General Discussion
Topic: One body following another at constant speed
Replies: 4
Views: 2641

Re: One body following another at constant speed

Probably not. You will probably have to calculate the position of the players yourself. Maybe even not use the physics simulation at all to position the players since they will not act like billiard balls (i.e. you might want to have your own concept of velocity and change of velocity since players ...
by zoom
Wed May 18, 2016 3:59 pm
Forum: General Discussion
Topic: One body following another at constant speed
Replies: 4
Views: 2641

Re: One body following another at constant speed

It depends on what you are trying to achieve but a really simple way is to use joints. If there is one that suits your use case of course. Maybe a distance joint will give you the effect you are looking for or maybe a pin-joint (mouse joint) will suit better.

(Edit: fixed the spelling)
by zoom
Mon Dec 21, 2015 12:40 pm
Forum: General Discussion
Topic: Test if Body1 entirely contains Body2
Replies: 2
Views: 1865

Re: Test if Body1 entirely contains Body2

If the enemy is rectangle and it is always smaller than the city rectangle it is quicker if you test it yourself: Enemy has a min X and a max X (the left and right sides). if enemy.minX > City.minX AND enemy.maxX < City.maxX then the enemy is within the city on the X-axis. Then do a similar test for...
by zoom
Mon Nov 23, 2015 11:49 am
Forum: Bugs, Enhancements, Feedback
Topic: Couple of bugs found!!!
Replies: 4
Views: 4790

Re: Couple of bugs found!!!

maheshkurmi wrote:return -this.normals[1].getAngleBetween(Vector2.X_AXIS); //original
return -this.normals[1].getAngleBetween(Vector2.X_AXIS); //corrected


I can't spot the difference :-)

I'm sure William will appreciate a JUnit test case that can be included in the Dyn4J build if you have one.
by zoom
Sat Nov 21, 2015 7:48 am
Forum: General Discussion
Topic: replicate body state to/from a server
Replies: 3
Views: 2255

Re: replicate body state to/from a server

I did it a lot easier for myself since I don't actually need physics on the client. So ask yourself if your _really_ need accurate in-sync physics. I send object positions to the client but I delay the updates. So the client is mostly a few milliseconds behind what the serve has sent. In this way th...
by zoom
Sat Sep 19, 2015 5:25 pm
Forum: General Discussion
Topic: ExampleJOGL, BlueJ and RaspberryPi
Replies: 1
Views: 2137

Re: ExampleJOGL, BlueJ and RaspberryPi

You should ask on the JOGAmp.org forums, that error indicates your OpenGL code is not correct and you will have better chance of an answer there than here at Dyn4J. Please also try first with the latest version of JOGL if you do not use it already.
by zoom
Tue Sep 15, 2015 1:43 pm
Forum: General Discussion
Topic: MouseJoint(soon to be PinJoint) and Drag ?
Replies: 5
Views: 2970

Re: MouseJoint(soon to be PinJoint) and Drag ?

I use motorjoints for two things. One is to move "enemy mines" towards the player. This video is an early trial run, the dark pentagons are moved using motorjoints along a path. https://www.youtube.com/watch?v=owhEFjQSovQ This is how I do it: final Body controller = new Body(); Convex c = ...

Go to advanced search