this is my camera-setting:
[java] camNode = new CameraNode("Camera Node", cam);
camNode.setLocalTranslation(new Vector3f(-10, 5f, -40));
Now i want to allow camera rotation around my object…How could i solve it:cry:?
This should help you out: https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:intermediate:math
It is a cheat sheet with examples on how to rotate around a point.
Yeah thats quite obvious … But how could i enable the rotation from mouseinput in my camerasettings ?
[java]//A rotation around this up axis towards this direction
Quaternion q = new Quaternion();
look at ChaseCam, it rotates around an object and follows it
don’t get me wrong but since your a member for ~4hours I assume you’re new to JMonkey. There is a camera that does almost exactly what you want (if I understand you right). try:
[java]ChaseCamera chaseCam = new ChaseCamera(cam, YourSpatial, inputManager);
if you want a static distance to the object set:
(setting the max and min distance to the same value will obviously cause the camera to be fixed to that distance. You can also make the angle static this way if needed.)
to read more about chaseCam see:
Edit: seems like Sploreg was faster
yeah I am newbie ! Thanks a lot you´re great!