Announcement

Collapse
No announcement yet.

Rotation bug/problem c++

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

    Rotation bug/problem c++

    Hi I got stuck on a problem that i cant resolve. I thought that the best way to show it for you is just let you see whats going on here's a youtube link.
    https://www.youtube.com/watch?v=n9Q9...ature=youtu.be

    thank you in advance
    Code:
    FRotator rotation = UKismetMathLibrary::FindLookAtRotation(CurrentPosition, CurrentFollow);

    rotation.Pitch += 90.0f;
    MeshComp->SetRelativeLocation(CurrentPosition);
    SetActorRelativeRotation(FQuat(rotation));

    #2
    What direction is the weapon pointing by default? What is CurrentFollow from? The mouse position?

    You likely just need a simple acos(dotProduct(playerDirection, targetDirection)) maybe multiplied by a simple half space test to see if the sword should be pointing up or downward.
    Able Ability System - A high performance, robust ability system for UE4. Now Available!

    Comment

    Working...
    X