Mouse Scale Problem

Hello guys,

I am new to this engine and I am having trouble with a very easy issue(I guess).

I would like to make a square move in the screen following the mouse, for this I am using the following code:

public void simpleUpdate(float tpf) {

Vector3f origin = new Vector3f(.0f,.0f , -.14f);

Vector3f direction = cam.getWorldCoordinates(inputManager.getCursorPosition(), 0.0f);


System.out.println("A dond me mandan: "+(direction));


System.out.println(“Aqui toy el q se mueve:”+hammerNode.getControl(RigidBodyControl.class).getPhysicsLocation());

System.out.println(“Aqui toy el quieto:”+holderNode.getControl(RigidBodyControl.class).getPhysicsLocation());

System.out.println("Escala: "+rootNode.getLocalScale());


The hammerNode, which is the one that I want to move is moving but very little and I think it is because of the scale

of the mouse, it is very big.

If somebody could help me I would be very very gratefull.


Can you multiply the direction vector by a set value, say, direction.multLocal(2f) and see improvement in the speed?

Using normalizeLocal will make that vector of length 1, so it will be small no matter how much you move the mouse.