Hi guys!
In the moment I’m trying to make a gun witch can fire bullets (could be spheres) if you press the left mouse button. But I don’t know how I can do it…
Can somebody help me?
Yours,
Rex Dungeur
Hi guys!
In the moment I’m trying to make a gun witch can fire bullets (could be spheres) if you press the left mouse button. But I don’t know how I can do it…
Can somebody help me?
Yours,
Rex Dungeur
Do it step by step. First try to create a playground that displays a console message when the use presses the left mouse button.
Then, I would create a pool (an array) of maybe 10 spheres. And when firing, I’d add an animation to one of those spheres.
check this page Interact with a Scene - Babylon.js Documentation
That’s a cannon witch shoots from alone…
But nice project
Many demos will not 100% fit your needs, you will need to connect the pieces and make it your own. You have a shooting cannon, you have a way to interact with the scene - put them together and you’ve got yourself a gun
Lol
very nice