52void ObjectDossunSyuukai::calcRotating() {
53 constexpr f32 ANG_VEL = 0.08726646f;
54 constexpr f32 BEFORE_FALL_FRAMES = 10;
56 m_flags.setBit(eFlags::Rotation);
59 if (m_state == State::RotatingBeforeStomp) {
60 f32 targetRot = m_initRotY;
61 if (targetRot < 0.0f) {
63 }
else if (targetRot >= F_TAU) {
67 if (targetRot < m_rot.y) {
68 m_flags.setBit(eFlags::Rotation);
74 m_anmState = AnmState::BeforeFall;
75 m_beforeFallTimer = BEFORE_FALL_FRAMES;
78 if (m_currRot >= F_PI) {
82 m_cycleTimer = m_fullDuration;
83 m_state = State::Stomping;
88 }
else if (m_state == State::RotatingAfterStomp) {
89 const auto &curTan = m_railInterpolator->curTangentDir();
90 f32 targetRot = FIDX2RAD * EGG::Mathf::Atan2FIdx(curTan.x, curTan.z);
92 if (targetRot < 0.0f) {
94 }
else if (targetRot >= F_TAU) {
98 if (targetRot < m_rot.y) {
99 m_flags.setBit(eFlags::Rotation);
101 m_state = State::Moving;