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

Revert "Use VRCParentConstraint instead of constraint hack for world fixed objects when available (#1326)" #1363

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

bdunderscore
Copy link
Owner

This reverts commit a984cf8. The prior
behavior was to lock world fixed objects at their offset from the
origin; however with this change we ended up locking them at a location
relative to the avatar spawn location, breaking some gimmicks.

I tried experimenting a bit with VRCConstraint to try to replicate this
behavior, but it seems a bit non-trivial, so we'll revert this as a
hotfix for now.

…fixed objects when available (#1326)"

This reverts commit a984cf8. The prior
behavior was to lock world fixed objects at their offset from the
origin; however with this change we ended up locking them at a location
relative to the avatar spawn location, breaking some gimmicks.

I tried experimenting a bit with VRCConstraint to try to replicate this
behavior, but it seems a bit non-trivial, so we'll revert this as a
hotfix for now.
@bdunderscore
Copy link
Owner Author

FYI @JLChnToZ - this change broke some gimmicks, so I'm reverting it for now.

@JLChnToZ
Copy link
Contributor

Sad to hear, but I still thinking is there a way to migrate them.

@bdunderscore
Copy link
Owner Author

Yeah, let's unbreak things for now and then figure out how to migrate. I did try putting the prefab into a source - this works in editor but breaks in client unfortunately.

@bdunderscore bdunderscore merged commit 46f5296 into main Nov 20, 2024
5 checks passed
@bdunderscore bdunderscore deleted the revert branch November 20, 2024 03:04
@JLChnToZ
Copy link
Contributor

I would like to know the details on when it breaks. Guessing is it breaks when mixing use of other Unity constraints without migrating?

@anatawa12
Copy link
Contributor

anatawa12 commented Nov 20, 2024

AFAIK, world origin prefab trick will work as before with VRC Constraints so reimplementing without FreezeToWorld would be the solution to this breakage.

@JLChnToZ
Copy link
Contributor

AFAIK, world origin prefab trick will work as before with VRC Constraints so reimplementing without FreezeToWorld would be the solution to this breakage.

Do you mean just use the VRCParentConstraint with the prefab referenced in it?

@anatawa12
Copy link
Contributor

Sorry for late response.

Do you mean just use the VRCParentConstraint with the prefab referenced in it?

Yes.

@JLChnToZ
Copy link
Contributor

If so, I can make another patch with this alternative logic.

@JLChnToZ
Copy link
Contributor

Anyways, I need to know how to reproduce the not working cases for further patching.

@anatawa12
Copy link
Contributor

I think just placing something under MA World Fixed without constraints to the Avatar hierarchy would reproduce the problem. (not tested)

I think old (Parent Constraint to the prefab) way would place the object at the world origin and new (FreezeToWorld) method would place the object at the spawn position.

@bdunderscore
Copy link
Owner Author

Just add a cube at local position 1,0,0 with world fixed constraint on it. Correct behavior is to be locked to world origin + 1m, actual behavior was to lock to avatar spawn position + 1m.

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.

3 participants