Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add third person camera view #5633

Merged
merged 0 commits into from
Aug 18, 2022
Merged

Add third person camera view #5633

merged 0 commits into from
Aug 18, 2022

Conversation

jeus0630
Copy link

@jeus0630 jeus0630 commented Aug 3, 2022

image

Doing

  • Added new feature of third-person-camera-view
  • Added new button which control the camera POV.

Notes

  • In VR mode, it is only available with first person camera view.

Comment on lines 80 to 83
const mesh = createModelForSkinnedMesh(o);
if (mesh) {
isSkinnedAvatar = true;
o.parent.add(headlessMesh);
o.parent.add(mesh);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We(me and @jeus0630) need help this lines.

Default status is not shown head of avatar.
But, we don't know how to toggle avatar head.

So, we change here to avatar head always shows.
If someone helps 'how to toggle avatar head' we can fix here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can do that with the camera layers. Have a look at: https://github.com/mozilla/hubs/blob/cb20d48f4acc7e810928a9b7b302bdab51589c65/src/systems/camera-system.js#L281-L282

I will probably implement that myself this way. Will tell you here if I have sth. to show.

@@ -1561,6 +1562,23 @@ class UIRoot extends Component {
</>
)}
<ChatToolbarButtonContainer onClick={() => this.toggleSidebar("chat")} />
{entered && (
<ToolbarButton
icon={<VRIcon />}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We(me and @jeus0630. my team.) are not have any icon of '3rd person view' T.T
Help

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about making an option in the preferences to toggle between 1st and 3rd person?

@markusTraber
Copy link
Contributor

markusTraber commented Aug 15, 2022

@jeus0630 @juunini As I told, I did my own implementation which works with the layers. Here you can see the comparison to the Mozilla Master. Here is the branch itself.

I implemented an option to switch between 1st and 3rd person via the preferences. All the interesting stuff for you is in camera-system.js. I am not sure about how I implemented it. The function "setMode" basically ignores calls to switch to 3rd person if the user is connected via VR.

@juunini
Copy link
Contributor

juunini commented Aug 17, 2022

@markusTraber Thanks :)
I'll tell @jeus0630

@jeus0630 jeus0630 merged commit 84a1901 into Hubs-Foundation:master Aug 18, 2022
@piyush2greedy
Copy link

@juunini
Can you please help. Where do we need to make code change in Hubs Code to see the third person view.

@jeus0630
Copy link
Author

@piyush2greedy You can check out here #5660

@h3d-longnsp
Copy link

@jeus0630 How to enable this feature? I see that it had been merged to master and also the develop branch was deleted but on my Hubs cloud instance there is no option to toggle first/third person view

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants