Smooth Attached Object movement

Hi, I’m creating a VR game and I want to attach the space ship to the camera so it moves with it but its to static, I want to make it more realistic, it could be limitate the Y and X to a lower speed but I don’t know how. Could You Help Me? I speak Spanish so I don’t write that good :slight_smile: Thanks. C# is Beter.

I have this so the Space Ship with the camera could move:

public float Speed;
public GameObject SpaceShip;

void Update()
{
    SpaceShip.transform.Translate (Vector3.forward * Speed * Time.fixedDeltaTime);
}

Is realy short

Read a little about Lerp function, it’s really usefull in situations like this. Here try this:

Transform mainCamTra;
void Start()
{
	mainCamTra = Camera.main.transform;
}

void Update()
{
	mainCamTra.position = Vector3.Lerp(mainCamTra.position, spaceShip.transform.position, 0.9f);
}

PS: And remember to write variable names starting with small letter in C# ;> spaceShip, not SpaceShip ;]