Another sword Rotation solution!

all is did was a simple if statement, it worked on both left and right .

if (IsKeyDown(KEY_R)){

    rotation = {0};

}

it also work with isMouse

  if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)){
          rotation = {0.f};   }

is this solution any good?

Hi ZakMa,

The ternary operator is a shorthand for an if-statement, so your solution is a long-form version.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms