In the link below I extracted the relevant code for my game(To reassure you, I plan to import models instead of the ugly placeholder that will scar your gaming soul for all of eternity once I make them.):
I’ve been stuck for weeks on how to do the following two things:
- Rotate the mesh “fighterMesh” and its physics imposter in 3D based off of a mouseMove event listener, or maybe the canvas controls.
- Apply constant acceleration to “fighterMesh” and its physics imposter in the direction its facing in such a way that I can toggle it.
Some other things seem to be amiss as well, but they’re all minor. I feel confident I could figure out the rest.
And as you can probably see, the code is BEYOND slapped together. So if you have any suggestions to streamline it, please let me know.
Thanks in advance for any help.