Announcement

Collapse
No announcement yet.

Motion Controls....

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

    Motion Controls....

    Hey,

    so I've been trying to do some game development as a weekend project for a change.

    I'm currently can't get motion controls to work properly.

    Now if I understand corectly you would bind motion controls like this:
    Click image for larger version

Name:	2016-10-22_1009.png
Views:	1
Size:	4.4 KB
ID:	1197312
    Code:
    void ASImpleBallPawn::SetupPlayerInputComponent(class UInputComponent* InputComponent)
    {
    	Super::SetupPlayerInputComponent(InputComponent);
    	InputComponent->BindVectorAxis("MoveVector", this, &ASImpleBallPawn::MoveVector);
    }
    void ASImpleBallPawn::MoveVector(FVector motionVector)
    {
    	GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, FString::Printf(TEXT("x: %f, y: %f, z: %f"), motionVector.X, motionVector.Y, motionVector.Z));  
            ...
    }
    However the values are always 0

    If I bind "Gravity" for example to a regular Input-Axis it does work, but I only get a single Axis....

    Any help?
Working...
X