Hi mates, I need many suggestions on how to correctly fire a laser beam from the player to a target.
In my RPG project I'm currently using a WOW camera targeted on the player (a droid).
Let's say that on a certain key pressed (cmd) the cursor becomes a target.
And from then you can click and get the object hit if any.
So, what can you suggest on how to fire a laser beam with an efficient process?
Guess the theps could be:
1) get the position property of the player transform component and put it in variable POS;
2) get the rotation property of the player transform component and put it in variable ROT;
3) set an origin for the laser beam (could be somewhere beyond the player, either on its capsule surface), making some math with the POS;
BUT THEN...?
What would you suggest for properly setting the target point?
And for best drawing a laser line (hopefully without need of vectrosity)?
Maybe I can switch from a laser beam to a vector effect (there are some decent on the store), but the main question still remains...