Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Mesh position slow to change when updated in animateReady #65

Answered by IRobot1
IRobot1 asked this question in Q&A
Discussion options

You must be logged in to vote

I was able to fix by adding change detection

  constructor(
    private cd: ChangeDetectorRef,
  ) { }
  animateGroup(event: NgtRender) {
    if (this.controller) {
      this.position = this.controller.position.toArray();
      this.rotation = this.controller.rotation;
      this.cd.detectChanges();
    }
  }

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
11 replies
@nartc
Comment options

@IRobot1
Comment options

@IRobot1
Comment options

@IRobot1
Comment options

@nartc
Comment options

Answer selected by IRobot1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants