Hi and welcome to the community,
Could you set-up a PG to help us debug. Setting the rotation quartenion to null or setting a new vector3 cancels the rotation quartenion. I suppose thatās what you wanted. Now, the arc rotateCamera likely needs some sort of translation to match the direction of your character, since itās orbital and from a target.
Iām not the best with maths and Iām also a very āvisualā person, so at least for me, the playground would help, if by any means possible?
Meanwhile, again welcome to our Community and have a great day
Thanks
Anyways I dont mind changing it to quaternions, I just but here is the playground
But theres a problem, the warehouse node is being loaded (i can see it in the inspector) but I cant see it on the screen. also the skybox isnt showing up on the screen
(Everything is loading well outside of the playground tho)
Indeed. In fact, the warehouse model is also not loaded. Nothing from external is.
Reason is:
To load an external asset in the PG, you need to comply with the rules to load from āreliable sourcesā.
Please take a look at this section of the doc.
The path to the model points to a subfolder of the root (the PG root) which does not exist, obviously. Since the link should be a path to some other server (from the āreliable sourcesā stated above).
Once this done, let us now and we will see to this camera thingy. If you have other issues loading your scene in the PG, donāt hesitate to ask. Meanwhile, have a great day
Likely because it comes after the faulty model load, but as said, we can see to this later, once you have found how to properly load your external assets in the PG.
which is nice
also, I changed my mind and ima make it a first person game, so how do I do that? With all the collisions and physics and stuff
and also, for later (after the first person controls) how do I fix the shadows? Especially self shadows for the level itself, so buildings can cast shadows and stuff
also, for later of course, if I have a glb model of animated arms for fps games, how do I attach it to the player in first person in a way that it will look ārealisticā?
Note: i looked in the docs for all the stuff above except for the fps arms, and i didnt find much that can help
Yes. Itās a fairly wide subject and it would be good to learn a bit around the different cameras and the handling. Collisions, move with collisions and self shadowing (shadowing in general) are all seperate topics you will need to learn one-by-one.
Also, note that you can sure have two (or more) cameras in your game. You could have a first-person view cam and a third-person view cam. Everythingās achievable, though I wonāt tell you itās easy. Nonetheless, lucky you, there are a fair number of examples, playground samples and tutorials for you to learn or simply soak-up the content, twist and tweak and experience.
For a starter, I made a small selection that might be of interest to youā¦
Thereās a nice PG I used myself as a base for this understanding. Below is the link:
Thereās also a simplified version, focusing on the aspect of āpointer lockā. When in first person view, you will want to lock the pointer and display your pointer as the ātargetā for whatever interaction (i.e. shooting). This aspect of pointer locking in browser (with its constraint) and the targeting from the character/camera view is a subject on its own. Again, thereās a number of threads and examples in this very forum, if you search for something like āfpsā + āpointerā + ātargetā.
Here is the link to one of the threads around this subject of mouse move with cam/character and pointer lock:
On the side of third-person view and a camera that follows the character, thereās also some good stuff from experienced members willing to share their expertise. In particular, thereās this tutorial with playground examples from @DRLeria Iād like to share with you:
And thereās of course much more to find in this forum and in the docs. If I recall other links, I will postāem here for you.
Others, like @labris also have a lot to say about character control and camera handling. If you want to go the FPS route, you might want to have a look at Yuka. Though I donāt know what type of game you are planning to create?ā¦
About collisions and move with collisions, I suppose a first basic understanding of how this works (with or without a physics engine) can be gathered from the docs. Iād suggest to start by reading this section as well as this small part/workshop around basic collision.
Then, if you plan using a physics engine (recom would be Havok), youāll also find the section in the doc within the section dedicated to the engine. At this point, I could extend the content of this post writting tons of stuff and sharing dozens of links. As I said, the subject is wide and the specificities in BJS around this subject are numereous. So, I guess Iāll let you discover the above and continue your journey and whenever you have a more specific question, feel free to cc me.
Eventually, also post a new question with a specific title thatās related to just your problem/question. Try to always provide the context and if possible, a playground.
I hope the above will help and meanwhile have a great day
I have discord for BJS but to be honest, Iām not regularly online and I have other things I need to attend to May be you could use codepen.io or similar or simply use the PG. May be break it down, so you wonāt have as many issues (with one eventually impacting the others).
You can also PM me but know that Iām not a pure dev. I mean when it comes to the most academic piece of code, I sure know my way around BJS, but there are much better devs/ENGs than me in this forum. Iām more of an art and creative dir (just to make this clear).
EDIT: And since you marked this post as a āsolutionā, I would advise you make a new post with a title corresponding to your current issue. You will get more views, faster and more accurate replies from the members or the Team.