instant move an object to a position + offset value

hi,

im trying to use the seek steer script from the unity wiki. i want it to follow the player object by an offset value.

eg : steer to a point just a little above and behind the player.

im using an empty game object called waypoint and updating it to the player position.

the script works fine when i assign the player transform directly to the waypoint every fixed update()

as

    player = GameObject.FindGameObjectWithTag("Player");
    waypoint.transform = player.transform

or

waypoint.transform.position = player.transform.position;

however i am unable alter the position with offset.

i have tried to assign waypoint.transform.position with player x,y,z coodinates and also the transform.translate() both to no avail.

i would appreciate a code with an example of how to do this.

thanks and regards.

i think i have it figured out now.

i was not using the “new” keyword , which was what was causing problems for me.

just for anyone else having the same kind of problems , the code im using now is

waypoint.transform.position = new Vector3(player.transform.x , player.transform.y + 20 , player.transform.z + 20);