Pawn Mouse Movement (similar to Freelancer)

Your post was very helpful thank you. :slight_smile: The only real issue I have is that I need the ship to rotate to face the mouse cursor. If I use quaternions it’s fine unless I’m using it combined with the mouse position.

This is my current code:



	ASpaceGamePlayerController* PlayerController = (ASpaceGamePlayerController*) GetWorld()->GetFirstPlayerController();
	FTransform Transform;
	FRotator Rotation;
	FVector MouseLocation;
	FVector MouseDirection;

	PlayerController->DeprojectMousePositionToWorld(MouseLocation, MouseDirection);
	Rotation = MouseDirection.Rotation();

	Transform = this->GetTransform();
	Transform.SetRotation(Rotation.Quaternion());
	Transform.NormalizeRotation();

	this->SetActorTransform(Transform);


(I was messing around with stuff so that’s kind of rough. Before I had interpolation.)
To be honest if I could find a method that can apply some sort of force to rotate the object that would be even better. I could just make it apply that force until the ship aligns with the cursor.