Change the Tris example board from 3D to 2D

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

User avatar
gg
Posts: 82
Joined: 19 Sep 2010, 21:16
Contact:

Change the Tris example board from 3D to 2D

Postby gg » 30 Jan 2017, 02:26

Hi,

How could I get the board to show from 3D to 2D? I created my own 10X10 board and added it to the assets. It looks OK in the scene tab, but in the Game tab it says "No cameras rendering." I searched the internet and found that I need to setup the camera to orthographic and the Z coordinates to 0.

my own board.PNG
(93.01 KiB) Not downloaded yet


Another thing I did was took the Tris 3X3 board, deleted the surrounding cube, but I can't get the camera to stay fixed. I don't want the players to be distracted with the 3d camera movement. Any suggestions? I'm stuck on this.

Thanks!
User avatar
Lapo
Site Admin
Posts: 20048
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Change the Tris example board from 3D to 2D

Postby Lapo » 30 Jan 2017, 09:48

Hi,
you should probably convert your project from 3D to 2D:
https://docs.unity3d.com/Manual/2DAnd3D ... tings.html

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
gg
Posts: 82
Joined: 19 Sep 2010, 21:16
Contact:

Re: Change the Tris example board from 3D to 2D

Postby gg » 31 Jan 2017, 04:03

OK, I made the camera fixed above the 3X3 board by disabling the Camera Orbit (Script).

Why are the elements in the canvas always visible in the game (The Game Chat, Restart and Leave Game buttons) while the 3d board needs to have a camera on it?

This is the project structure (I'm sure you're familiar with it). There are a lot of extra 3D settings I don't need, such as cameras, lights, walls, floor etc.

CameraFocusObj
Cameras
CameraBeauty (I see this one affects the perspective; how do I make it fixed?)
CameraAnalytical (what does this camera do?)
Lights
DirectionalLightKey
BaseSceneElements
CalibrationFloor
CalibrationWalls
EventSystem
Logo
Board
Canvas
ChatPanel
Panel
Controller
User avatar
Bax
Site Admin
Posts: 4385
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Change the Tris example board from 3D to 2D

Postby Bax » 31 Jan 2017, 08:26

The chat and other UI elements are always visible because they are placed on a canvas with render mode set to "Screen Space - Overlay".
I think you should just work on a canvas (the same one or a different one) and remove all other objects you don't need.
CameraBeauty is like CameraAnalytical with additional settings and effects (antialiasing, vignette, depth of field, etc). I don't think you need those in a 2D game.
Paolo Bax
The SmartFoxServer Team
User avatar
gg
Posts: 82
Joined: 19 Sep 2010, 21:16
Contact:

Re: Change the Tris example board from 3D to 2D

Postby gg » 01 Feb 2017, 16:56

Thx, was doing the wrong thing. Found this which is exactly what I need

https://unity3d.com/learn/tutorials/tic ... game-board

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 1 guest