[SOLVED] My game won't shoot

Hi, I don’t know how to fix this I’m still learning to do games, my game just won’t shoot I checked my script and I don’t know where to fix this

here is the link to my project
DACILLO_MIDTERMS_MNMTECO | Editor (playcanvas.com)

Hi @Miguel! It seems this topic is a duplicate. Why did you create a second account?

@Albertos I wasn’t able to log in earlier thought that I forgot my password it turns out because earlier our wifi is not working properly

Alright. I suggest to try to make the shooting work in a new project first. Then you can try to implant it in your own project too.

So I tried it to a new project it also leads me to having an error on “bulletInstance.rigidbody.teleport(bulletPosition)”

You probably need to update the ID of the asset?

Can you share a link of this project too please?

Oh yeah the id asset I changed it and it work but the problem is the collision is not working between the bullet and the creature

https://playcanvas.com/editor/scene/1565232

I don’t see it works in that project. Can you share the new project too please?

here

DACILLO_MIDTERMS_MNMTECO | Editor (playcanvas.com)

It doesn’t help if you keep sharing the same project.

oh, this one I actually solved it i just put a wrong id asset, but my collision is not working on my original project PlayCanvas | HTML5 Game Engine

For me the shooting is not working and currently your scripts are broken.

@Miguel I made this project some time ago to launch items something similar to what you are trying to attempt. Maybe it will help and feel free to fork it. @Albertos is correct. Maybe you should start with something a bit stable and pull your scene into it.

https://playcanvas.com/project/917448/overview/fpstarget

Also you could fork the following and do the same.

https://playcanvas.com/project/405842/overview/tutorial-fps-movement

1 Like

@Albertos I already updated my work here PlayCanvas | HTML5 Game Engine . The shooting is now working but the collision doesn’t work

Thank you so much

I don’t know how you test your project, but if the script below is your shooting script, then it confirms your shooting is not working.

image

that’s weird because on my side when I launch my game it is already shooting and on my end the script is working just fine
Screenshot (373)

Are you sure it’s the same project?

image

Yes this is the link

DACILLO_MIDTERMS_MNMTECO | Editor (playcanvas.com)