Friday, October 11, 2019

java - In JBox2d when dragging a Body, why is the direction is flipped vertically?


Why is it when I drag a JBox2d Body with the mouse, the vertical component is flipped?


e.g. If I drag down-right, the Body moves up-right.


Is this expected behaviour, a bug in JBox2D, a Mac incompatibility or something else?


I'm on a Mac (10.9.3) with Java 1.7.60, JBox2d 2.2.1.1. I thought it might be Mac's "natural scrolling" but changing that setting didn't have any effect.



Answer




There was change in the directions between versions of the JAR. I updated to the later JAR and the drag direction became correct.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...