Open rsepierre opened 2 years ago
I have since successfully compiled peasycam and tested the functions that worked seamlessly. Just as I feared I had to invert .forward and .backard but everything works fine.
I'm not sure how pull requests work. The last two commits added themselves to the PR automatically. If considered for master, should probably filter out changes made to the compiler/builder and .gitignore
Ok it's a lot of commits for this, I'm sure there was better way to git my way out of there but here should be everything that changes with the pull request as of now :
import processing.core.PShape;
in Resizable_Offscreen.java
Eclipse was warning about. public void move(final double dx, final double dy, final double dz) {
center = center.add(rotation.applyTo(new Vector3D(dx, dy, dz)));
feed();
}
public void pan(final double dx, final double dy) {
move(dx, dy, 0);
}
public void forward(final double distance) {
move(0, 0, -distance);
}
public void backward(final double distance) {
move(0, 0, distance);
}
@jdf Hi there ! I allow myself to tag you as I'm guessing this might have slipped through your priorities :-) I was wondering if you were satisfied with the current state of the pull request ?
The goal for this commit was to provide a public interface to move the PeasyCam camera center position. Because "center" is private, even by extending the PeasyCam Class, we can not add the possibility to move or "pan" backwards or forwards relative to the camera.
For this reason, I created three methods (although they are not all necessary) which are similar to the pan method :
I could not find any way to actually build the library so I could not test the code. I think then maybe forward and backward are inverted, otherwise I think it should behave just like .pan() as code is mostly identical;
Alternative ways I thought about to fixing the issue :
As unfortunately extending the PeasyCam Class does not provide any public interface with "center" I hope that you will consider those changes for the main branch.