Skip to content

(Critical) Bug fix: Controller parentLink pop-out phenomenon - #64

Open
createsejin wants to merge 1 commit into
acidbubbles:masterfrom
createsejin:parenting
Open

(Critical) Bug fix: Controller parentLink pop-out phenomenon#64
createsejin wants to merge 1 commit into
acidbubbles:masterfrom
createsejin:parenting

Conversation

@createsejin

Copy link
Copy Markdown

Description

This PR addresses a critical issue where controllers would "pop out" or snap incorrectly when using parenting features alongside Timeline.

Technical Details

1. Fix incorrect state retrieval
In src/AtomAnimations/Animatables/FreeControllerV3s/FreeControllerV3AnimationTarget.cs, the GetRotationParentRB() method was incorrectly retrieving the Position State instead of the Rotation State. This has been corrected to retrieve the proper Rotation State.

2. Resolve conflict with VaM's built-in parenting
In src/AtomAnimations/Animations/AtomAnimation.Playback.cs, I modified both SampleParentedControllers and SampleController methods.

The logic has been updated to check if the controller's current state is ParentLink or PhysicsLink. If either of these states is active, Timeline will now skip overwriting the position and rotation values. This allows VaM's built-in parent/physics system to take full control of the controller without interference from Timeline.

Results

These changes resolve the conflict between Timeline and VaM's built-in controller system.

  • Users can now freely switch controllers to ParentLink or PhysicsLink without experiencing the "pop out" issue, even if the controller is registered as a Timeline target.
  • State transitions via triggers (e.g., switching from Position/Rotation state to ParentLink/PhysicsLink) now work smoothly and naturally without glitches.

@acidbubbles

Copy link
Copy Markdown
Owner

Oops for the reversed one!

But animating parented controllers is by design, this allows making animations relative to a parent. Which can be useful (although it's preferable to use Timeline's built-in parenting)

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.

2 participants