Announcement

Collapse
No announcement yet.

Get real rotation value from the sequence (not -180 <> 180 )

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Get real rotation value from the sequence (not -180 <> 180 )

    Hi,

    i am strugling for hours to just get the real rotation value in C++ from my actor animated by the sequencer.
    (exemple 720° and not -180° )
    i use this value to blend between two rotation, so i have a glitch when i pass from -180 to 180 or 360 to 0;

    it seem a really stupid question, here my issue in video




    Code:
    // getLocationTracking(indexToLookStart) return Actor->GetActorTransform();
    
    CranePosition.Blend(getLocationTracking(indexToLookStart), getLocationTracking(indexToLookStart+1), blendTargetActor);
    CarriageTrackRotationControl->SetRelativeRotation( CranePosition.GetRotation() );
    i try almost all possibilities with the GetActorTransform(); (Euler(), rotator(), GetRotation() etc...) but impossible to get the real value of the rotation.
    Thank you very much for your help

    Best regards
    Daniel


    #2
    If you want it to be 0 to 360 and not -180 to 180 you simply take the value and add 180 to it. this will now always make it 0 to 360.

    Comment


      #3
      hi ViperG ,

      thank you for your reponse
      unfortualty, is not working, is the same problem with -180 <> 180 or 0 <> 360.

      when i blend between the two rotation and for exemple with an alpha at 0.5:
      if the firstCubeRot (have two spin 0-720°) he pass the first spin, and it reach for exemple 375° become 15°
      so i have an glitch and the blend dosen't work anymore


      Code:
      // if my secondCubeRot as an static rotation of 90.
      blendRot = FQuat::Slerp(firstCubeRot, secondCubeRot, 0.5f));
      
      // before the first spin if firstCubeRot is 359
      // the blendRot = 224,5.
      
      // but whenthe first cube is reach 360 (become 0)
      // the blendRot become 45 instead 225.
      so it's why i need the real rotation from the sequencer and not clamped to 0 - 360 or -180 <> 180

      i look for hour and i find anything

      it's possible in C++ the get the active sequencer and get the value of an channel ?
      or something similar ?

      Thank you very much for your help.
      Best Regards
      Daniel

      Comment

      Working...
      X