Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [layers]

The tag has no usage guidance.

0
votes
1answer
10 views

Culling mask don't work

I have the following setup: MainCamera render everything except ImageTurret layer. TurretCamera render only ImageTurret layer on a RawImage My problem is: MainCamera render everything and ...
1
vote
0answers
22 views

Incorrect draw order with LineRenderer

I have a Player game object with a sprite renderer and a line renderer. The sprite for its body and the line for a rope. The problem is that the rope isn't visible (I can see it's drawn in the scene ...
0
votes
1answer
70 views

Need help with sorting layers on a 2D game made in Unity

I'm busy with my full blown project in unity, it's a 2D game as I thought this would make a good starting point. So to the problem, I've got 3 elements in the game. The ground, an object and a beam. ...
0
votes
2answers
27 views

GameObject With Background Covers GameObject Without Background

so I have two sprites, a box and an X animation (I'm making Tic-Tac-Toe). So, in the code, when I click on the box, it instantiates the X animation at the right place. The X animation does not have a ...
0
votes
1answer
679 views

Assigning sprite to a sorting layer through scripting

I have few prefabs with sprites which I want to assign to different sorting layers. How can I do it? I am also wondering if sorting layers matter if I use a perspective camera. Do they?
1
vote
2answers
497 views

Tiled2Unity depth sorting issue with multiple layers

I have been struggling with an issue for a couple of days now trying to get depth sorting properly when using multiple layers in tiled. My tiled map is set up as follows: The sorting Layers I have ...
0
votes
2answers
19 views

Is there any way to change the layering of objects in Actionscript 3 without altering the run order?

I'm making a simple platformer in Adobe Animate, and I need the player to be layered in front of the stage because of a gimmick in the game. Unfortunately, whenever I change the layering order, it ...
3
votes
2answers
523 views

How does layer based collision affect performance

In Unity3D, and others, there are Layer Based Collision System which makes collisions only happen between specified Layers. It defaults to all layers colliding with all others. Does making use of ...
0
votes
0answers
127 views

OpenGL FBOs and rendering scene in layers

I have three different layers in which my scene is organized, meaning I can place different entities in different layers. The layers are rendered in order, let's call them LAYER_1, LAYER_2, and ...
0
votes
1answer
1k views

Raycast does not detect child layer if parent layer is set to ignore

I have a LineRenderer that ignores certain Layers based on a Raycast using LayerMask. I have ...
1
vote
1answer
3k views

Unity - blur on one camera effects the other as well

I'm trying to fake a DOF effect for Sprites by using 2 cameras, one for the sharp objects, one for the blurred ones. I have set up the layers like Blur and Sharp accordingly. So I have these 2 ...
0
votes
3answers
2k views

Detecting mouse click for the uppermost layered 2d sprite in Unity

I have two sprites. One for the entire background and another small sprite, which is a foreground object. I have written code for both of these objects in their ...
1
vote
1answer
396 views

Making Buildings Transparent When the Player is Behind Them

I am making a 3D twin stick shooter in Unity and this is a question I need to have answered while I am still in early development. The map my player is in will have very tall buildings that will ...
0
votes
0answers
169 views

Using Sorting Layers with 3-d meshes

I have 3 layers of objects in a game that I am working on. The layers are the "map" layer (Background), "UI" layer (Labels, etc), and the "Object" layer (Movable objects). I am working on a 2-D game, ...
0
votes
1answer
577 views

LibGDX - Getting Tile Map Layers Problem

While following a tutorial with LibGDX, I am working with tile maps. This is the method that I'm using: tilemap.getLayers().get("Collision Layer"); or ...
0
votes
1answer
158 views

How do i make an object to be visible only on a particular layer?

Please refer the image below to understand. I am working on 2D game. I have three elements: "background(layer 0), foreground(layer 1) and the object". I have used sprite renderer to set background ...
0
votes
1answer
308 views

XNA - Darkening background and drawing something on top

In a game a group of friends and I are working on using XNA, we wanted to create an effect where we could darken the screen and draw something else on top of the darkened portion. For example, we have ...
2
votes
1answer
185 views

Libgdx, tiled map - how to reload layer?

In the simple platform game I'm making, when player collects coin, its cell is set to null. Is it possible to recover all cells from layer "coins" after player dies?...
0
votes
0answers
95 views

How to play a video and run content at the same time

Alright, so I have a video loaded, and other game content. Earlier this morning, when I was just learning how to actually play a video, I magically happened to get the video running in the background,...
0
votes
4answers
763 views

AStar for isometric game with overlapping walkable areas

We're developing an isometric game that so far has had a single ground level (y = 0) for the avatar to walk on. Pathfinding for this can be solved with a relatively simple 2D AStar tile map. We're ...
3
votes
1answer
961 views

Why is OnCollisionEnter2D called when it's layer's collisions are being ignored?

I'm sure this is down to my lack of understanding of the unity physics system. I'm trying to implement a simple one-way platform for a 2d game and have got stuck on creating a reliable way to let the ...
7
votes
1answer
1k views

Why the AnchorPoint doesn't affect the `CCLayer` Positioning?

I think there is a difference between the CCLayer and CCNode behavior when I change their AnchorPoint. I will describe what I mean and please somebody explain it. Scenario: I start with ...
2
votes
1answer
1k views

Animating feet seperately from the body

I have a character and I would like to animate a walking animation for it. However i get the following result when I animate it: (ignore the green lines/ markers/ sound) As you can see the foot ...
0
votes
1answer
621 views

How to code camera for layered map in unity

For a current unity project I need a layered map like in Dwarf Fortress. The game will take place in a 3D city enviroment and the camera should be 'snapped' to layers. So there will be (for example) a ...