Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Transfer canvas position to world position?

Hey, I have a canvas with a tmp text and would like to create an animation that moves a ball (in a curve) exactly into the "O" in my text.

My previous approach would be to try to translate the position of the text into the world coordinates using a script and then move the ball there.

If someone has an idea how I could implement it, I would be very happy!

Best Answers

  • DamastDamast Member
    Accepted Answer

    This is how I solved it so far:

    Ball.transform.DOJump(new Vector3(ballAnimPos.localToWorldMatrix.m03, ballAnimPos.localToWorldMatrix.m13), 1f, 1, 2f);

  • emrnlemrnl Member
    Accepted Answer

    Hello, recently I have tried doing something like that my solution was changing the Render Mode property of the Canvas Object's Canvas Component. Change it to Screen Space - Camera, Then add your cam to the Render Camera property of the Canvas component. Now you can visually locate your canvas in the unity world space then if you put any object between your camera and canvas you should be able to see it on the scene.

Sign In or Register to comment.