Basically say you have a direction, but you want to go the opposite way…
how do you do dat…
yeah, n00b question
Basically say you have a direction, but you want to go the opposite way…
how do you do dat…
yeah, n00b question
you could try multiple the value with minus
int direction = 1;
System.out.println( ( -1 ) * direction );
or if you are using vector3f use .negate()
Vector3f b = new Vector3f(1f,1f,1f);
System.out.println(b.negate().getX());
This is probably worth reading and understanding:
http://wiki.jmonkeyengine.org/doku.php/jme3:math_for_dummies