How do i add a cursor dot to my players' screen in the middle so they can aim the clicking/selecting

my game is a 3d free roam first person and i want to add a cursor so they can easily select things

  1. Create a 2D Screen.
  2. Add an Image Element as a child.
  3. Upload a crosshair image (PNG with transparency).
  4. Assign crosshair texture to the Image Element.
1 Like

i dont know how to make the background go

I think you are asking how to implement a first person camera.

For the video above, I just forked a project with a basic first person character controller:

https://playcanvas.com/project/626211/overview/first-person-shooter-starter-kit

It’s based on this script:

oh ok

do you know what i need to do to make it so my character can turn on and of the flashlight by pressing f?

do you know how to make it so if they press f the light turns off and on?

@DemonlordIV, for keyboard events, you can take a look at the following tutorial - https://developer.playcanvas.com/en/tutorials/keyboard-input/.

oh ok thanks

i dont understand how to make it so it checks if the light is off and the key is pressed to turn it on and visa versa