In the framework of a szenario for which I use the SmoothMover and Vector class, I am trying to get the direction of the "private vector movement" (that is automatically generated by the system, summing up all vectors and addForce calls) by using this method:
However, the variable vectorRotation (declared on top of the class the method is in) remains 0 though the method is called in the act-method of the class.
Does anyone know why?
1 2 3 4 5 6 | public void getVectorDirection() { Vector vector = new Vector(); int currentRotation = vector.getDirection(); vectorRotation = currentRotation; } |