I am making an object in world space convert to UI space then move to another UI object like how it works when you collect a wumpa fruit in crash bandicoot, in fact EXACTLY liike how it works in crash bandicoot. I just cant seem to get it to work, i have tried spawning it in world space as a UI object → moving it into screen space → then moving it to the desired object but it didn’t work (I probably just didn’t understand it, im new to unity)
If someone can help then that would be great
If that’s effectively what you’re looking for, I would use the Camera.WorldToScreenPoint() function. So when you start moving your object, you make it target this point, and once you decide it is close enough to the point, then you update your UI and then destroy your gameobject.
Yes but i try to do that and it doesnt work? i dont know why… and when i get close to what im looking for then it goes the wrong way (Excuse me sing ms paint)
my code is basiclly
public GameObject Player; //Is World Space
public GameObject UIEndPoint; //Is Screen Space
public Camera Cam;
public Vector3 StartPoint;
public Vector3 EndPoint;
public float Smoothness;
void Start{
StartPoint = Cam.WorldtoScreenPoint(Player.transform.position);
EndPoint = UIEndPoint.transform.position
}
void update{
transform.position = new Vector3 (Mathf.Lerp(StartPoint.x, EndPoint.x, Smoothness), Mathf.Lerp(StartPoint.y, EndPoint.y, Smoothness), Mathf.Lerp(StartPoint.z, EndPoint.z, Smoothness))
}
And it still doesn’t work. 
Im not sure if they did it this way in the original, but this is how i would do it with unity. How about deleting the collectable upon collision with the player and then moving a Sprite representing the collectable from the player-screen-position in your canvas. (Looks like this in the youtube link, because the apples sometimes stay a little while in the same screen pos. 0:42 in the video)
//set up ui with an endpoint img and an apple img somewhere in the canvas
//hit space -> apple image will move from player screen pos to enpoint
public GameObject Player;
public GameObject UIEndPoint;
public GameObject UIappleImg; //ui image moving across screen
public Camera Cam;
public float Smoothness; //lerp speed
private Vector3 EndPoint; //UI apple counter position
void Start()
{
EndPoint = UIEndPoint.transform.position;
}
void Update()
{
if (Input.GetKeyDown(KeyCode.Space)) //debug to show effect. Hit space several times
{
//TODO: swap if(input) to if(collision with collectable)
//TODO: destroy collectable and spawn apple img
//position apple img at player screen pos
apple.transform.position = Cam.WorldToScreenPoint(Player.transform.position);
}
apple.transform.position = Vector3.Lerp(apple.transform.position, EndPoint, Smoothness);
//There is a Vector3.Lerp() for lerping positions.
// Easier than Mathf.Lerp() which takes only one float.
}