|Topic was automatically imported from the old Question2Answer platform.
how to create aiming line (or maybe can with dot) like billiard game or some brickbreaker game?
Raycast aim from a certain point (taking from your billiard example, a pool cue) and draw a dotted line along the length of the
Raycast. When the player has chosen the desired target, use the
Vector2 of the
Raycast in the movement code. Use a “dotted” texture with a
Line2D to draw the actual line pointing to the target.
Ertain | 2021-01-22 09:22
oo ive got the answer i try to create line using set position and it works, so i can aim using mouse position,
and the end point of my aiming line is on the mouse position, how to make it trough to the viewport border? and is it possible to create reflect line if the line is goes to oustide of the viewport?
wahyuadiramadan | 2021-01-22 10:17