Howdy folks,
So I have a pawn which is spawned at world origin. When I use AddTorque to yaw the pawn the actor location values (namely the X and Y components of the vector) returned by GetActorLocation change as the pawn turns although the pawn itself does not move and does yaw around it's pivot like it should.
When I use SetActorRotation to yaw the pawn it turns like with AddTorque, but the location values stay at 0 which is what I expect.
I call AddTorque in my pawn class like this...
Now my pawn does not pitch or roll. Only yaw. It's a top down asteroids style game. Perhaps I should mention that my pawn is composed of two components. Root is a UStaticMeshComponent and attached to it is a USphereComponent.
Perhaps I'm missing something. Would not be the first time.
So I have a pawn which is spawned at world origin. When I use AddTorque to yaw the pawn the actor location values (namely the X and Y components of the vector) returned by GetActorLocation change as the pawn turns although the pawn itself does not move and does yaw around it's pivot like it should.
When I use SetActorRotation to yaw the pawn it turns like with AddTorque, but the location values stay at 0 which is what I expect.
I call AddTorque in my pawn class like this...
Code:
FVector Torque = FVector::UpVector * ((TorqueForce * TurnInputVal) * DeltaSeconds); Mesh->AddTorque(Torque);
Perhaps I'm missing something. Would not be the first time.
Comment