I’m trying to move ship but it’s not moving smoothly. The ship is vibrating as it moves.
void MoveShip()
{
float yPos = Input.GetAxis("Vertical") * Time.deltaTime * movementSpeed + transform.position.y;
float zPos = Input.GetAxis("Horizontal") * Time.deltaTime * movementSpeed + transform.position.z;
transform.position = new Vector3(transform.position.x, yPos, zPos);
if (movementSpeed <= 15)
{
movementSpeed = 15;
}
}
This video may help understanding
https://streamable.com/6vrymw
Are you moving the ship in update method? If so try moving it to fixed update.