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

fix: character trigger area has incorrect position #2859

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

fcolarich
Copy link
Collaborator

@fcolarich fcolarich commented Nov 22, 2024

What does this PR change?

Fixes #2815

The issue here was that we are now spawning scenes at -10.000 in y coord, so when the assets are loaded, their cached positions are also set with that y and unless the transform changes we dont update it. AND the trigger areas copy their position each cycle from the CachedTransform in the TransformComponent.
The fix for that will go in another PR (which requires recursively update all the cached transforms of all the children of the scene after we set it in its definite position) as I found as simpler solution for this particular issue.
Parenting! By parenting the Trigger Area to the entity that in theory contains it, we ensure proper movement without needing any constant updating of the transform position to mimic any potential change in the parent's transform. After all, that's what parenting is for.

How to test the changes?

TEST A

Log into metadynelabs. The camera should be forced into 1st person and you should not see any other players around you.
That's all :)

TEST B

  1. Download this scene: https://github.com/decentraland/sdk7-test-scenes/tree/main/scenes/9%2C99-modifier-areas and uncompress it somewhere
  2. Enter the scene root folder and run npm i and then npm run start -- --explorer-alpha
  3. Close the Explorer that auto-opened. Leave the scene running in the console/terminal.
  4. Download the build from this PR and connect it to the running scene using the console command according to your OS.
  5. Enter the 2 "Camera mode area" areas and confirm any of them changes your camera mode (the left one changes to first person cam, and the right one changes to 3rd person cam)

Copy link
Member

@pravusjif pravusjif left a comment

Choose a reason for hiding this comment

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

character trigger areas (CameraModeArea and AvatarModifierArea SDK components) are still broken with these changes.

I find it easier to test with this dedicated test scene:
https://github.com/decentraland/sdk7-test-scenes/tree/main/scenes/9%2C99-modifier-areas

@pravusjif pravusjif removed the request for review from lorux0 November 28, 2024 18:26
@pravusjif pravusjif self-assigned this Nov 28, 2024
Copy link
Contributor

@anicalbano anicalbano left a comment

Choose a reason for hiding this comment

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

✔️ Both steps checked and working as expected, The camera view is correctly modified.

28.11.2024_16.10.18_REC.mp4
28.11.2024_15.59.35_REC.mp4

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

Successfully merging this pull request may close these issues.

[QA] First person view is not forced when playing Ratscape
6 participants