Help me! Show me my 3D model on a 2D screen

Help me!
I need to display my entities on a 2D screen.
Move and rotate my entities with the mouse.
What should I do?

Here’s my demo: https://playcanvas.com/project/802471/overview/demo
is : carModel

Hi @Geekln, and welcome!

Check out this thread.

For rotation, you can do the following -

this.entity.rotateLocal(x, y, z); //Without physics
//or
this.entity.rigidbody.applyTorque(x, y, z); //With physics

To learn how to use mouse input in PlayCanvas, check out this tutorial.

Hope this helps!

https://playcanvas.com/editor/scene/1173663
I read it and tested it, but I couldn’t finish it. Can you help me make it happen? Thank you, I want to learn your method

Hi @Geekln, I’m on my phone right now, so can’t access the project, could you please elaborate on the issues you’re facing?

When I disable the “screen space” ,My background becomes blurry。I went through all the steps and still couldn’t see my 3D model

Have you changed the layers? I believe not changing the layers to ‘UI’ could cause that issue.

I’ve changed the layers, and I’m using a 2D screen。

I’ve just taken a look at the project, the only solution I can think of is to try something like this - [SOLVED] Way to render 3D on top of 2D screen. @Yohami_Zerpa, it’d be great if you could let us know if you faced the same issues and how you had fixed them.

1 Like

Check this link.
https://playcanvas.com/project/560797/overview/tutorial-render-to-texture

You can just use this material in it to render on UI. But I am not sure about it as I didn’t need to try it yet. But I think it is possible to apply it on a 2d screen.

2 Likes

Thank you very much. I need to adjust the layer after I finish setting. Finally, I succeeded

1 Like