Im a little stuck with my shooting game, My character walks around and shoots other characters. Im using ray casting and things looking great. I got the correct characters dying. I need to give the players a sense of where these bullets are coming from so i wanted to create a smoke trail effect along the ray created by shooting. How ever the trail looks wrong, the trail looks like its going somewhere else even though the correct characters are getting hit and dying.
so i have simplified the code here
char1.setLocalTranslation(new Vector3f(70, 0, 120));
char2.setLocalTranslation(new Vector3f(80, 0, 130));
final Vector3f aimingPosition = char1.getLocalTranslation();
final Vector3f aimingDirection = target.subtract(aimingPosition);
ray = new Ray(aimingPosition, aimingDirection);
from the sys-outs i see the the start of the ray and direction are the correct world co-ordinates. but ray looks off. Perhaps in not understanding what setInitialVelocity is?
any help would be greatly appreciated.