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
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)
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.