将动画角度固定在椭圆上

问题描述 投票:0回答:1

我使用这个公式来计算椭圆Phi = atan(y*py/x*px)上的角度,其中pypx是椭圆的参数。当动画越过-PI和PI时,它会改变PI rad的方向。

我使用RxJs并且不知道如何在正确的时间进行交换。也许我需要订阅一些活动?

arrows showing the orientation of the object that I get, its moving in clockwise direction

javascript animation rxjs spark-ar-studio
1个回答
0
投票

使用Math.atan2而不是atan。

© www.soinside.com 2019 - 2024. All rights reserved.