Sprite on top of Gameobject in 3D world

What I want:


What I have:


I’m using a world space canvas and code to make it face the camera on instantiation, but it looks “too much” inside the world. The coin starts slightly warping when the camera is moved to the sides. I want the coin to just flat be above the gameobject like in the first image.
Should I even use Canvas at all?

Super greatful for any help!

You can try using normal Canvas
Recalculate when the camera moves
Calibrate the world spatial position that the image should correspond to

1 Like

Thanks for your reply.
With normal canvas, do you mean Screen space - Overlay?
Should I use Camera.ScreenToWorldPoint to calibrate world position?

My personal suggestion is to use screen space camera mode
Vector2 screenPoint = camera.WorldToScreenPoint(worldPoint);//Canvas Target Camera
//First, convert the world space into screen coordinates
RectTransformUtility.ScreenPointToLocalPointInRectangle(canvasRectTransform, screenPoint, thisCanvas.Camera, out localPos);
//Then use the specified Canvas RectTransform//(the root Canvas to which the element belongs)
//Calculate the position of the screen and the corresponding position of the camera

The performance pressure of this calculation is not high
Even if a regular device calculates 100 times per frame, it won’t cause too much pressure

If you only need to confirm whether the world position of the target exceeds the camera’s observation range before updating the position, you can also handle more at the same time

Thanks, what I needed was actually just

transform.LookAt(transform.position + camTransform.forward);