2D Elements follow 3D objects (always facing camera)

0 favourites
  • 6 posts
From the Asset Store
Template for a basketball game with a 3D aspect (illusion of 3D)
  • I am working on a multiplayer game and I wanted to do something similar to the picture below, where a 2D text is always following the player's 3D object while still being a 2D object (or a 3D object that's always facing the camera).

    Is it possible in any way in Construct 3?

  • Yes, you just need to attach (via, pin or parent/child) a text object to the 3d object and put the text at the top of the layers (probably a layer that doesn't scale with zoom if you use scale features on other layers) so it shows. If you are thinking of using a 3d object for pixel type text that is more complicated, I am not sure if you can angle the faces to make sure it is always facing the camera.

    yours

    winkr7

  • So you're saying just pinning a text object to the tank's object would work? Even though it's a 3D environment?

    I tried to do that and it didn't work. It wouldn't even appear on the scene as it would be within the window's boundaries. Maybe I am doing it wrong (help XD)

    I was trying to do something with a plugin I bought to support 3D models in Construct 3. I created a plane in Blender as a test and tried to mess around a bit to see if I could make it work.

    It sort of works, but not really... I tried to make the plane rotate in the Z and X axes according to the position of the camera in relation to the player, but it's not working 100%, and the Z scaling is stretching the object too much. I don't know if that's me using the plugin wrong or if it's a bug that still hasn't been fixed.

    I just wonder if there's an easier, more effective way.

  • To transfer position to different layers in 3d you want to use the 3dCameras layerToCanvas() canvasToLayer() or the new 3dCamera layerToLayer() expressions.

    3dcamera.layerToLayerX() and 3dcamera.layerToLayerY() is only available in the Beta branch for now.

    documentation to read about it:

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/3d-camera

  • if you are looking to actually create a billboard, R0J0hound made an example using mesh and math. It's uploaded on the community discord.

    Though it will probably be easier to do the billboard like you are doing with Mikals 3dObject addon using a plane.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes, I am trying to make an actual billboard for the game. The code I got seems to go in the right direction, but it falls flat on several occasions. In some angles, the plane doesn't face the camera at all. It works a bit better from a distance, but it looks stretched. Apparently because of the Z scale.

    Here's a video showing how it currently looks and how I want it to look:

    Subscribe to Construct videos now
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)