Make crosshair actually do something


#1

so i was wondering how do i make my guns crosshair aim in and out here’s the link to the project https://playcanvas.com/editor/scene/703725


#2

Best way to learn is find code that works and deconstruct…rewrite for yourself.
Here’s an old Tankx project with projectiles (bullets). Just find the scripts that seem to be used for the bullets and copy the code. You will have to update the code, as this is an old version of PlanCanvas.
Looks to me like the scripts: Fire & Bullet would be good starting points.
PlayCanvas Tankx game
Working Tankx game


#3

um thnx any tips on how to code in a game i know alittle about howw to code on playycanvas like with the attributes and stuff


#4

I’ve been coding for quiet some time and worked in the games industry for Sony. One thing you need to know is how to solve problems. If you don’t know how to do something…Google is your best friend! You literally have the world at your finger tips full of information. So, get used to researching. Sometimes it might take you awhile to find what you’re looking for. Always keep learning and doing tutorials on stuff you’re interested in!
Best way to figure out coding is looking at other people’s code and taking it apart…making it your own.


#5

Also…here’s a good tutorial on making a shooter game:

Space Shooter Tutorial


#6

um yea I am really good at researching stuff tht i need but I usually copy the code.Also i am learning code rn i know most html and working my way to css then javascript.