Questions tagged [layers]
The layers tag has no summary.
41 questions
0
votes
0
answers
121
views
Unable to play animation from another layer
I'm attempting to play an animation from different layers but having some difficulty. I'm trying to play animation transitions in one layer and then go back to the base layer to play an animation ...
1
vote
1
answer
2k
views
How to disable a layer in a Tilemap's collision mask via code?
I have a tilemap in Godot 4.1 and I have defined a physics layer for a tileset, but I cannot figure out how
to disable a layer in collision mask in code.
I already found out that I should get tileset ...
2
votes
1
answer
310
views
How to properly handle hundreds of layers of tiles
GOAL
I am making a top-down tile-based sandbox game, and it will have 400 layers of destroyable terrain, It will not use chunks, it will store the map in memory like Terraria, but only render the ...
0
votes
0
answers
189
views
Why is the back layer sometimes rendering in front?
I have a layer rendering issue, where the top layer of content will sometimes not render to screen as it appears that the bottom layer is rendering on top (even though it's behind in world space). It ...
0
votes
0
answers
156
views
Layer sprites according to their vertical position
I need advanced blitting options in my game. It's a 2D game that has trees' sprites along with the player's sprite.
I want that every tree sprite to be displayed either in front of or behind the ...
0
votes
1
answer
131
views
Make non-sprite render in front of sprite
How do I make the non-sprite (BasicSpellProjectile) render in front of the sprite (Tower 2)?
Note: The camera is located at z=-10.
The z positioning apparently ...
0
votes
1
answer
2k
views
Unity Raycast not detecting layers
I am having problems with layers detection using raycasts.
Context: I created a grid to use in a pathfinding algorithm on a 2D plane. I want to implement now different weights according to the layer ...
0
votes
0
answers
559
views
Layers in Unity won't drag
I'm trying to rearrange my layers in Unity but I can't seem to drag them. When I try to do this I'm in edit layers under the heading sorting layers and I click on the = symbol and try to drag it but ...
1
vote
1
answer
2k
views
ContactFilter2D does not detect a trigger even with "use triggers" enabled
I'm Using Unity 2018.3.11f1 and I'm going crazy trying to understand why the "use triggers" variable of the ContactFilter2D is not having any effect and I'm always detecting only the non-trigger ...
1
vote
0
answers
777
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
2
answers
125
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 ...
1
vote
2
answers
972
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 in ...
3
votes
2
answers
3k
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
1
answer
4k
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 ...
0
votes
3
answers
6k
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 ...
0
votes
0
answers
281
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
1
answer
417
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 ...
2
votes
1
answer
277
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
4
answers
1k
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 ...
8
votes
1
answer
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 ...
0
votes
1
answer
729
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 ...