Closed
Conversation
jakezira
reviewed
Sep 15, 2022
character-controller.js
Outdated
| let position = null, | ||
| quaternion = null; | ||
|
|
||
| if(_getSession()) { |
| const localVector4 = new THREE.Vector3(); | ||
| const localVector5 = new THREE.Vector3(); | ||
| const localVector6 = new THREE.Vector3(); | ||
| const localVector7 = new THREE.Vector3(); |
Contributor
There was a problem hiding this comment.
Use existing variables if possible.
character-controller.js
Outdated
| quaternion = null; | ||
|
|
||
| if(_getSession()) { | ||
| const h = this[hand === 'left' ? 'leftHand' : 'rightHand']; |
Contributor
There was a problem hiding this comment.
Any difference between localPlayer and this?
I think only local player can grab inventories.
game.js
Outdated
|
|
||
| if (o.position.distanceTo(localVector) > offset) { | ||
| collision = null; | ||
| if(downCollision) { |
Contributor
There was a problem hiding this comment.
Is downCollision boolean or map?
| } else { | ||
| if(localVector.distanceTo(localVector9) < offset && localVector7.y < localVector9.y) localVector5.copy(localVector9); | ||
| if(localVector5.y < localVector7.y) localVector5.setY(localVector7.y); | ||
| o.position.copy(localVector5); |
Contributor
There was a problem hiding this comment.
What is this formula for? Better to have a comment with explaination.
jakezira
reviewed
Sep 16, 2022
| grab(app, hand = 'left') { | ||
| let position = null, | ||
| quaternion = null; | ||
| if(this instanceof LocalPlayer) { |
Contributor
There was a problem hiding this comment.
- Can player call grab when it's not local player?
- Even though if it's the case, you can check this with different code. Please reference how it did on existing code.
Contributor
Author
|
Closed this PR and made a new branch & PR: #3714 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the following issues when editing scenes: