I need to show a bullet’s flight from a player to a mesh and make some effect.
I use something of that:
const velocity = new BABYLON.Vector3(
Math.sin(parseFloat(this.viseur.rotation.y)),
-Math.sin(parseFloat(this.viseur.rotation.x)),
Math.cos(parseFloat(this.viseur.rotation.y))
);
this.bullet.moveWithCollisions(velocity);
But, when I aim to meshes in different distances, the bullet does not collide where I have aimed.
How to resolve it?