-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: dev
Are you sure you want to change the base?
Conversation
Windows and Mac build successfull in Unity Cloud! You can find a link to the downloadable artifact below. |
There was a problem hiding this 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
There was a problem hiding this 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.
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
npm i
and thennpm run start -- --explorer-alpha