How to focus a Spatial on a Cam?

hello everybody  :), look at the following images directly please.

Figure 1

Figure 2

Figure 3

these are three effects from different angles , but the effect I required is like the first image above.

I mean , whatever I change the location , I want it always show me one effect like the Figure 1. is there have any way ?



ortho mode?

ok…How to achieve it. :?

What you want is known as ortho mode…[]=ortho

Unfortunately I'm not familiar enough with jME3 to know if it works the same as in 2

I guess u are looking for billboard. Here is quite useful link:

And this is how I implemented it in my code:

      public void updateLogicalState(float tpf) {
         float distance = getLocalTranslation().distance(startPoint);
         Vector3f toObj = camera.getLocation().subtract(
         Vector3f toObjXZ = new Vector3f(toObj.x, 0, toObj.z);
         float angle = Vector3f.UNIT_Z.angleBetween(toObj);
         Vector3f upAux = toObj.cross(Vector3f.UNIT_Z).normalizeLocal();
         Quaternion rotation = new Quaternion().fromAngleAxis(-angle, upAux);
         rotation.multLocal(new Quaternion().fromAngleAxis(
               (distance / MAX_RANGE) * FastMath.TWO_PI, Vector3f.UNIT_Z));
         angle = toObj.angleBetween(toObjXZ);


Also it should be possible to write a shader for this, and probably JME3 already has billboards support(At the time I wrote code above it did not).