Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How do i make a crosshair like in the other first person shooting games

hello, im currently making a small first person shooting game and wanted to do crosshair hit.


like when i hit a enemy a hit appears on crosshair.

example

photo credits:https://www.roblox.com/library/53456968/Team-Crosshair-2-Aiming-Hit

Best Answer

  • joachim747joachim747 Member
    Accepted Answer

    This depends a bit on how you have your shooting mechanic working. In general you want to play a ui animation, when the bullet hits something.


    if you are waorking with raycasts, there is a callback function which allows you to check what you have hit. If this is of type enemy e.g., then play animation crosshair-hit. Animating the crosshair hit to fade-in and -out should be done quite easily by using the alpha value e.g.. you can also scale it slightly, might look good.

    if you are using a gameobject, you should provide some additional functionality that the bullet finds the player it was instantiated by.

Sign In or Register to comment.