#🖼️┃2d-tools
1 messages · Page 10 of 1
It could absolutely be the sprite atlas. If the atlas is larger than the max size you have set, it will be downscaled
I just have no idea why it would randomly happen upon reload
I think it was the sprite atlas!
Just to confirm something - There is no way to assign a Grid component to a Tilemap/Tilemap Renderer/etc, right? The configuration requires a Parent game object with Grid, then for Tilemaps, Tilemap Renderer's, etc. to be on descendant game objects?
I have a grid component with the child components as the layers...e.g background, collission - then I assign it to a tilemap
How can i remove these weird lines in unity? I am using a tilemap for my sprites
this is my settings for the sprite
Let me rephrase - There is no way to have a Tilemap use a Grid from a separate, non parent game object?
I am unsure
how do you make the Pixel perfect camera zoom out?
Zooming out is antithetical to the purpose of pixel perfect camera
Or are you just asking how to set the target asset resolution
lmao you use the same tilesheet than me
It's a great tilesheet lol
why cant i slice this spritesheet
could you post a screenshot of what the Inspector displays when your sprite selected in Project view? The importer settings need to be Texture Type: Sprite and Sprite Mode: Multiple. That makes it possible to see the sprite slicing options in the Sprite editor.
ok i managed to figure it out
had to select multiple sprites then attach the secondary animation directly to my player object
Hello all! I am creating Tilemaps in the editor and then saving them in separate scenes, which are additively loaded at runtime.
The sprites are displayed correctly in Play mode, but any game objects I have assigned to my tiles are not instantiated (even though they are correctly instantiated in the editor). As far as I can tell GetTileData is not being called when the scenes with the Tilemaps are loaded in.
Do we need to manually call Tilemap.Update or some other method to get the game objects intantiated?
I discovered the issue and I think this is a bug.
If you instantiate the prefab that has the Tilemap in an activated state, everything works as it should. If you instantiate the prefab in a deactivated state (by parenting it to a deactivated game object), it breaks. If you load a scene where the root game object (containing the Grid and child objects with Tilemaps) is deactivated, it also breaks.
So it appears that if the Tilemap is loaded in a deactivated state, it breaks the Tilemap. I am using Unity 2020.3.37f1, so it's possible this has been fixed in a later version.
Edit: I'll also add that it's not the case that the game objects are simply hidden. The game objects I have associated with my tiles are colliders that serve as the floor, so I can confirm whether they are being instantiated or not because the player falls through the floor when they are not.
What specifically was it that breaks?
The game objects that are assigned to tiles are not instantiated.
Just to add to this, calling Tilemap.RefreshAllTiles fixes the issue (I am calling it after activating the game objects with the tile maps). Interestly, however, BaseTile.RefreshTile is not called when RefreshAllTiles is called, although that doesn't seem to hurt anything.
Back with another question . . . does anyone know why in Play Mode the bounds of the generated tilemap sprite (at least, that's what I assume the white rectangle with the blue circles in the corners represents) is so much larger than the actual tilemap area (area with tiles)? I tried adjusting the Chunk Culling Bounds and that has no effect on this.
i think i should ask this here not really sure, how can i change where that circle centerpoint is
im trying to just move the circle down a bit but i cant seem to do that
and when i put a parent empty game object it takes teh same exact shape/centerpoint
Theres sometimes gray lines between my tiles.
The old brackeys tutorial i'm going off said to disable antiailiasing in quality settings, but it seems like that menu changed since then and i cant find antialiasing in it any more
apparently its also already disabled on the camera i'm using... any ideas
the video showed this, and you can see the gray lines in the screenshot
idk if everyone elses quality settings looks like this but its completely different for me
Anyway... if u know how to stop antialiasing or how i can use pixel perfect camera pls do tell
hey is there any reccomened ai tool for generating sprites?
MSAA is still in the quality settings if you're in built-in render pipeline, URP asset if you're using URP
Camera has the SMAA option (subpixel morphological) which is a different type of AA from MSAA (multi-sample) that should not cause seam issues
However seam issues can occur even without AA, such as when camera size does not precisely match the sprite PPU
Pixel perfect camera component is used to precisely set the camera size to eliminate that issue, but it requires you to conform to a pixel perfect workflow
Another workaround could be to decrease the PPU a very tiny bit so the sprite of the tile overflows its grid square by half a pixel or so
There may also be seams that show some of the tile's color, rather than background in which case it's a separate issue from color bleeding between tiles
how do you get a smooth camera movement with pixel perfect camera and pixel snapping turned on?
Fundamentally you cannot
It will always be jittery because one pixel is the smallest step the camera can take
i see, is there any good way to get around it? or at least make it a bit less jittery
The worst varieties of visual jitters occur when the camera and individual sprites are moving at similar speeds so that they're rapidly jumping between screen pixels as a result
That's the biggest problem you can eliminate, and it's usually caused by scripts that make the camera follow some gameobject
yeah i noticed that when the camera follow was off it was decently smooth, but i kinda need it to follow haha
If it has smoothing, the smooth deacceleration in particular is very likely to clash with the movement of sprites, especially the sprite it follows
Even with unsmoothed follow camera jitter may occur if the camera position is upated at a different frame than its follow target's, so that it would always trail one frame behind
If you want a follow camera, parenting is your best option since it's the most solid way to sync their positions
If you're using Cinemachine the process is trickier, but using LateUpdate may help
If you need a smoothed camera, it's best to have it follow very rarely, and if at all possible only in a straight line at a brisk pace from one position to the next
You can see an example of this in Celeste
A lot of the "clash" of the motion that causes jitter is because all gameobjects have floating point precision positions and are only later snapped to nearest pixels, this means the closest pixel to snap to can very rapidly change when your camera and every sprite can smoothly move sub-pixel distances per frame relative to each other
But even in old games where positions were all in pixels and movement was likewise measured in pixels, jitter did occur back then too since nothing fundamentally locks the "pace" at which they move together
Pixel jitter is kind of an optical illusion that we observe when two sprites or the sprites and a camera are changing their pixel position in the same direction too close in time to each other but not at the same time
Smooth follow camera just tends to create a huge number of opportunities for that to occur
i see! thank you so much, this was a huge help :D
If your camera is snapped exactly to your player, I should add that you may want to design your game so that typical player speeds are something rounded-ish like 1, 1.5, or 2 pixels per frame
that can make a big difference for a smoother feeling result
Basically the shorter the "pattern" is, the smoother it will look.
Moving 1 pixels per frame is a repeating pattern of [ 1 ] every frame (great)
Moving 1.2 PPF is a repeating pattern of [ 1, 1, 1, 1, 2 ] (not so great, noticable jitter)
Moving 1.5 PPF is a repeating pattern of [ 1, 2 ] every frame (okay)
Though really if you can get away with it, it's probably better not to use pixel snapping unless you're a huge stickler for retro styling
Hello can someone really help me this is such big issue
first time using maptiles and stuff so i try to create map tiles then after that i put in my brush i create more maptiles because some of them are just for background and others are for colliding but literally when working with it they overlap with each other when i save or start the game
and that is so frustating cant even do anything
im creating more layers but it doesnt work
nvm im a idiot you dont create the layers in hierachy is on the actual renderer thing
i am working on a 2d game where the player is a square and I want to display a different sprite on each side (to represent the different ability's) the player can change these in the inventory so I have to be able to swap them out individually, I was thinking about a modular sprite but I have no idea how to do that.
You can just have the secondary sprites be children of the character?
hey everyone, does anybody know where I can find more detailed information on how Unity's sprite system works behind the scenes? I'm a student and want to write a paper on it, but all the information I can find is about how to use it, not what it actually does. For example, how does Unity process the sprite atlas assets? Does is read them with UVs? It would be a great help if you could direct me to a place where I can find out more...
What level of detail did you want? They're essentially just quads. If you're hoping for true behind the scenes code, you won't find anything on that without paying for source code.
how can add a light 2d into a particle system
Right now, I am having trouble finding anything at all, so any level of detail would be helpful. I am not a programmer tho, and only know some basic coding.
https://forum.unity.com/threads/lwrp-using-2d-lights-in-a-particle-system-emitter.718847/ try solution in post #14
which app should i use for 2d sprites?
for pixel i suppose aesprite
mostly seen people use krita
okk ty
is there a free version?
na
LibreSprite is a FOSS branch of Aseprite which is some features behind in updates
Aseprite is also free to compile from source, in case you have the know-how
The premium version is well worth it though in my opinion
Sprites are stored as SpriteRects.
Which has the GUID, name, pivot, border, and rect.
Heya, is anyone familiar with an approach to cast "smaller" shadows in a 2D Top down setting? Currently shadows cast shadows as far as the light distance. Instead to simulate height in a 2D Top down game it would be nice to be able to cast smaller shadows the closer you get to the light source.
In 2D URP shadow casters can only cast infinitely tall shadows
You can tweak normal map distance per light to get shorter shadows, but only on normal mapped surfaces, not shadow casters
that sounds like a job for true 3D lighting
There are also third party assets for 2D lighting that can handle those cases
Personally I might go with fully 3D lighting since that's what Unity is best at
How would that work with sprites? I would like to maintain Pixel art style art
You can use pixel style sprites but you'd have to treat them as 3D geometry for the sake of shadowing
URP doesn't support Pixel Perfect Camera without the 2D renderer, which in turn doesn't support any 3D lighting unfortunately
So that combination would be restricted to built-in render pipeline
But you don't need the Pixel Perfect Camera for a pixel style
Aha I see, I have a tool called Kenney Shape that can turn pixel art into 3D objects. But how would I go about having spritesheet animation for such 3D models?
Simply make all the parts of the spritesheet then quickly switch meshes or?
I suppose you would
That means you get shadows from actual 3D meshes and don't have to deal with sprites at all
Never done 3D, is there a term for this kind of "shape shifting"? Usually what I have seen for 3D is things have bones that you then can animate as you see fit.
Otherwise another approach would be to draw a shadow and simply resize/rotate depending on how close you are to light sources
They usually have bones yes
You should be able to animate the mesh filter component's mesh reference just as you would a sprite renderer's sprite reference
hmm, it did not allow me to drop it into the animator. I will take a look at this more tomorrow
Thanks
If the property cannot be keyframed, I expect you should be able to make a script component that sets the mesh reference from a serialized array, then keyframe that array index
Alright thx, that's a good idea. Little bit tedious for multiple animations but maybe worth the sacrifice for better light/shadow 😄
If the component is set up well it should be just as quick if not quicker to animate the index rather than explicit asset references
For such low resolution objects you could probably just use a cuboid shadow caster?
I am not familiar with this and google is not very good at telling me what cuboid shadow caster is.
Meaning you could make the shadow casting part by scaling cube meshes and use minimal to no animation for them
is there a way to get like discount for photoshop
It is a cube roughly scaled to the shape of your sprite and set to 'cast shadows only'
But this is still in the 3D world right? I can't mix both 2D and 3D?
You can, and I assume in this case you would mix 2D and 3D
Otherwise if you use 3D meshes for your characters you can cast shadows off of that mesh without worrying about separate shadow casting geometry
where would be the best place for downloading / commisioning tilesets for LDTK
Hello, I'm trying to understand how the tilemap feature works in unity and how to put tiles on the map, and not only I can't reasonably select and move tiles on the tile palette (they just select randomly no matter what tile I select, when I try to move them they move in chunks and stuff like that), when I try to paint with them on the actual scene the actual tile is miles away from my mouse cursor and this makes no sense, what should I do to solve this?
Are your tile pivots correct, and the sizes/ppu matching the tilemap?
Hey guys what would be the best tool to use ti create pixel art and a game
i personally use aseprite
Yeah i have heard thats good is it for free
afraid not
although i wouldn’t be surprised if it was on sale on steam, since the holiday season is coming up
It is on sale but too much for me to get atm
sorry to hear that, my prof mentioned this pixel art website but i haven’t tried it out myself
i’m not sure how well it works, so you’d have to do additional research
hope you find something that works for you!
This could work thanks
Will give it a look
@thorn turtle you any good with pixel art
i don’t do much pixel art unless it’s for school
i mostly do regular digital art
Ok understand thats all good
Is anyone available to help me out with something?
Can you be any more vague?
it is free, but you have to build it yourself
you either pay for the pre-built .exe (just click and install) or build it yourself (took me 20 minutes) and install it
Cool thanks
I'm looking to get into making some levels with LDK,
does anyone know / have any example tilemaps i can practice with before I buy some / create my own
LKD?
@errant surge Kenney has plenty of tilesets
https://www.kenney.nl/assets
Many more can be found on OpenGameArt
https://opengameart.org/
So from my understanding, you'd use a map like this for the basic ground textures
and then a second, seperate automap for the things like cave walls... is that right? or can/should you use automapping for the floors as well
There's many ways to go about it technically
Unity only handles tile rules between two tile types per layer (or tiling rules between filled and empty space, to be precise)
Im making a game, and i finished the first level. So i move on to the next level, but all of a sudden my player prefab is invisible and it retroactively turns my player model on the previous level invisible as well. None of the enemy models or anything but the player were affected though and I can still move through the level like normal. It also is only affecting it when im actually playing the game, not while its in the game or scene tabs. Anybody know what could be causing this?
im not sure this is the right place to post this but i can only assume theres a tool idk about or something that i accidentally activated. Im very new to game development.
Hey guys, need some advice, I want to build game boy Pokemon game like(sort of tile pixel 2d game) , but I know nothing about Unity right now, I was wondering weather it's better to go for unity or other tools like flame with flutter
do you mean that every time you play the game you start visible but become invisible once the next level starts? or is the player now always invisible since you’ve began development of the second level?
a possible explanation for the discrepancy in scene tab vs game is that you have the player’s z set too close to the game camera so it’s not rendered anymore
The camera might have a different Z position between the scenes
Always invisible from the start.
Since it looks like both engines can easily handle what you need it to do (sprites and 2D tiles) it doesn't really matter which one you use
Whichever coding language you're more familiar is likely the better choice
Hey , does anyone have any good tips or tools on how to deal with the sorting issues as seen here?
the camera is at -10 and the player is at 0 on the z axis so it should be showing up
i was just fixing that as im tinkering with tilemaps in unity. I just made another tilemap layer and paint areas where I move the Z value around to get around odd sorting issues. dunno how it will workout in the long run but its a quick and easy fix for now. blue areas are temporary offset spots, red is colllision :
Custom sorting axis based on the base of the sprite would probably get you a lot of the way there.
hello guys, im trying to either generate or use a ready 2d (pixel art) world, i am doing a project for a course and can't find an easy way to do it, is there an easy tool for this situation?
You'll probably need to provide more details. What is a ready 2D world exactly? What do you need this world to have? Is it sidescroller? Top down?
Tiled is a popular map editor with its own format and there are unity packages that allow importing them.
Sample Tiled maps:
https://github.com/jamesbowman/tiled-maps
SuperTiled2Unity:
https://github.com/Seanba/SuperTiled2Unity
How to reuse those tiles without editing the tilemap itself in RuleTile?
To make it more varied.
We are speaking about RuleTiles
The middle icon can be clicked to allow tiles to be used in places where they would fit if rotated or flipped
Yes but it only works if the tiles on tile sheet is facing the same direction?
Ah, you're right
Even if rotation is allowed, it's used only when necessary, when a tile of higher priority doesn't replace it
So the orientation would have to be the same on the sheet, and all the options listed in the Output array
hey all, i seem to be having trouble with understanding rule tiles and how to use them for my game. I have a rule tile for all my "wall" sprites, and i want to have specific North, South, East, and West walls, as my game is top down, but from a slight angle, like SmashTV or the 2D Pokemon Games. the playable/walkable floor of my level is on a separate tilemap from my wall, and as i understand it, regular rule tiles can only look for tiles on the same tile map, so im a bit lost on how to seperate north and south walls, and east and west walls. Any ideas on how to accomplish this?
Hi all
I was trying to make my shadow affect the lower grass tile map
Image
Like the rectangular grass under the garden bed
I toggled the sorting layers
And editted the shape
And changed the intensity
But for some reason this issue occurs when i target sorting layers
I don't want the shadow to cast anywhere else, only from the garden bed to the grass below it
It only works when I toggle the sorting layers to be everything
Here are my sorting layers
I want the shadow to be from the inner grass onto the dirt, here's how it looks when the shadow is applied to all layers:
When I set the layer of the shadow to only affect GrassBed (Grass around the garden), it does this:
When I do the inner grass it seems to do nothing, but i want it to only affect it:
How do I achieve this?
Forgetting that
Why are the shadows on my scene view different to the ones in game view?
And how do I avoid this?
I'd check that camera type is orthographic, and that there's no weird depth position or clipping plane values that could be causing something to cut off
I don't use 2D lighting a lot but I usually saw similar issues with scene viewport related to zoom/clipping planes, but not the other way around in game camera
@still tendon if this is the effect you want, all I had to do was to place the cyan sprite on a new lower sorting layer and then exclude that sorting layer from the red sprite's shadow caster target sorting layers
Just bumping this a bit
How tall are the tiles? In my mind it seems you could be asking about how to make basic rule tiles, or how to deal with fake perspective tiles that reach multiple tiles high
All my tiles are flat, it's a purely 2d game
So yeah I'm asking about basic rule tiles
Can you show what you have so far in terms of sprites and rules
I guess I just can't figure out the logic
Yeah I can in a minute
excuse the crude graphics i have atm, im just doing some testing.
red = north
light blue = south
green = east
yellow = west
rn im just experimenting with 4 tiles and will worry about diagnols later
Sure that works
Usually you have solid walls instead of hollow ones in an enclosed level, but there's nothing wrong with this way
Remember that when tile rule evaluation is successful, it stops checking, which is why you never see light blue or yellow walls in your example
anyone can tell me more on raycasting
Hey, I have a small weird problem with a tilemap collider using a composite collider. So Mario can wallslide if he detects a wall on the left or right, which works well when sliding against a left wall, but it glitches on a right wall. This only glitches if he is sliding on this tilemap/composite collider, but not on a normal boxcollider2D. The bug causes Mario's state to constantly switch between wallsliding and falling. The colliders are all on the same Layer and I use raycasting for custom collision detection.
Here is a video showing the problem. The white wall uses a boxcollider2D, while the Mario tiles use a tilemap and composite collider:
This is a code question most likely. Not a 2d tool one for sure
But what do you want to know?
well trying to figure out how to make a glass light reflection and something like a time of day system
and coloring for what would be the best setup for a gold glass like reflection
Are you wondering about rayTRACING then? You can use raycasting for what you mean too, but just wanna make sure
It does
It just doesn't much look like 3D ray tracing as there are no "surfaces" that we could see
Thank you Spazi
is it possible to make shadows complete dark
hey, im now to this and i have a question. when making tilemaps and palettes and trying to use them in unity,
- why the red outline
- do they have to be a certain size to fill the square? i have mine at 48x48 px, but it doesnt fill it
the red outline didnt appear a moment before
also i cant move the camera anymore
on the subject, in the sprite editor the option for slicing is blacked out, so i cant cut it into 9 16x16 squares (i wanted to try something but still)
A shadow is an area occluded from light
If you have no global or ambient light, the shadow is totally dark
Hey everyone! I have a question regarding Tilemap alignment. I've set up a Tilemap with a cell size of 256x256, but some of my assets (e.g., bushes) have different dimensions like 413x166. What would be the best approach to align these non-square assets with the Tilemap effectively?
Slice them from the sprite sheet by cell size / count and assign a custom pivot if you need to offset them
You don't really have to worry about getting "empty space" in the slice since the sprite outline cuts it out in sprite mode: tight
It looks like the plants have random vertical offsets even if they're on a grid, so you may have to adjust the pivot point manually for each
Can i make my walls not be lit up by light if it is coming from above?
Shadow casters with self-shadowing enabled I guess is what you're looking for
2D light has no concept of "above" though
yes but sadly this doesn't work for me
is there any way using masks or normal maps?
I guess I don't understand what the goal is
What's "not working" here?
Is this meant to be a side view or a top-down view?
i need to light be lighting up the wall if it is under the sprite but not if above so it looks 3d
I have hard time parsing visually what's wall and what's floor, looks like just yellow rectangles
Anyway I think you could use normal maps if you don't want shadow casting specifically as shadow casters are infinite in height
A normal map can be "angled" so it would receive light from one direction but not others
If that fails I guess you could also get a similar effect by splitting point lights into two 180° spots with different layers
Probably achievable with normal mapping though
Yeah, but idk how exactly to set up the rules to get seperate north and south walls... Its confusing me a bit
Sorry for the late reply, yesterday was a bit busy
With hollow walls you cannot
But if you swap to solid style that I mentioned then it becomes simple
What are hallow walls
By hollow I mean you're only tracing the edges of your rooms
Instead of having all the space outside of the interior be wall tiles
Hallowing is something else entirely
Oh
So your north wall checks if there's blocks next to it horizontally, but also if there's one above it
South wall checks if there's one below
Horizontal walls that have space above and below them do not know if they are north or south
From their perspective they could be both
Oh I see
Is there no way to somehow check floor tiles instead of only being able to check for other wall tiles?
No built-in way
The normal tile rules only check for presence of tile on that tilemap vs lack of one

thank you
So basically I wanna make my walls 2 blocks thick or something?
Yeah but you might as well fill the void with wall blocks
Unless you want "outside walls" also
Nah but idk I feel that looks ugly
Tho what I could so is if a wall tile is surrounded by other wall tiles, then I could make it a blank/transparent sprite so it looks about the same
What do you need it to look like? Are these both interior and exterior walls?
It's for a game that only has dungeons so it's all interior walls... I guess?
Sorry I kinda don't understand

Hold on
This is the look I'm going for
In terms of the wall and floor sprites
See how the walls have north and south sprites?
Yeah, the walls are filled in as I described
Well actually I've seen this tutorial series, and the guy did it using some weird algorithm that uses structs full of binary values, he didn't use rule tiles. Someone in one of the comments said that they achieved this same effect using just rule tiles tho, which is why I'm doing it with rule tiles
But idk how the commentor implemented their rule tiles, maybe they filled any void space with wall tiles
I don't see why not
You don't need empty space outside if it's a dungeon
I think the way the commentor phrases their comment, it insinuate that they didn't make any changes to the code
BTW idk if this changes anything but the dungeon is procedurally generated
No, you just have to consider the filling when generating
Maybe "carve" rooms instead of simply lining them with walls but whatever works
Eugh, that sounds like a big change to my algorithm over wanting some nice wall graphics

Hi guys, could somebody explain what is exactly the "Transparency Sort" and why it influence the top-down sprite layer in the top-down camera?
It's the axis that is used for sorting. So for RPG like perspectives in 2D, you want it to sort by the Y-axis.
Make sure you have the pivots of your sprites in proper places (like at the feet), and set the sorting to pivot mode on the sprite rendere.
Yes ok but I don't understand how it works🙈
The sprites are sorted by the axis. In this case whatever is lower down on the y (bottom of the screen) are rendered above things that are higher up.
It uses the pivot to calculate the position to determine the sorting.
Aaaaaahn okok now I understand!🤩
Thanks a lot
One last question, so the "Transparency Sort Axis", is the values that calculate the distance between each sprite's pivot?
It's the direction that will be used to order the sprites
I have a question about this. I have a tileset with a tilemap collider2D, and I place trees scattered throughout the map. Is there a way to make it work well? Because for sorting layer, the pivot position is taken into account, and some trees may be above and others below the pivot of the tilemap. I have opted to make each tree in a separate tilemap or to insert them as game objects. This corrects the problem, but it is not very practical.
Sorry my poor English
in general, multiple tilemaps are a good idea for separate layers
it’s fine to have like 20 tilemaps if you need. you just don’t want to go overkill because you usually do want to group things together that should be mutually exclusive and in the same “layer” of the game
Those definitely are words?
My words. Thx for asking.
How would i remove this orange outline? i need sprite selected but it is in the way of editing shader
Hey!
so, I've got a sprite shape with a tileset I've made in mind, but there keeps being a gap between the fill & the outline & I've tried EVERYWHERE & I can't find a solution
please help :D
fixed
apparently sprite shapes really get angry if you have the outline be thin in the sprite itself
Ask a question in one appropriate channel without spamming for help please.
please where i can question help
!support
Take a look at #🔎┃find-a-channel
:warning: This is not a channel for official support.
Please do not ping admins, moderators, or staff with Unity issues.
So, I have this simple sprite I split into multiple parts in sprite editor and now I want to use skinning editor (I am completely new to these tools, only watched a few tutorials)
How can I assemble my character to begin rigging? (You know, put the body parts together)
(ping me if you respond)
well, I found this, but how do I do that?
when I rig it
and then select the leg for example
the bones are connected only to the body
Hi everyone, I would like to ask if you know how to deal with such an uneven TilemapCollider2D? It's causing issues with my character's movement, and it can't bounce off the walls properly. I've tried using CompositeCollider2D, but then my character goes through the floor. I don't know what else to do about it. I noticed that everything works fine when I use BoxCollider2D for my character. Additionally, besides the previously mentioned issue, my character occasionally seems to get stuck in one place, and only after jumping can I continue moving. I'm not sure what causes this because sometimes it stops, and sometimes it doesn't, even in the same spot."
what do you mean by uneven
if you want to manipulate the shape of tilemap collision you could try to go to the sprite editor and change the mode to custom physics to manipulate the collision body. Remember to reset the tilemap collider after you update the physic collider
I mean that this TilemapCollider2D seems to create an outline of the Tilemap, and the Sprites appear to be uneven by default, causing issues with my character's movement. CompositeCollider2D improved these outlines to make them even, but it also caused the character to start passing through the floor
i will try thank u
np if you have any problem you can ask
Good to hear that, because I still have a bit of a problem XD. I don't fully understand how it works because I changed the Sprite Editor to custom physics as you said and reset the TilemapCollider2D, but I have no idea how to change these colliders now, especially since they should be perfectly straight. So far, they still seem to be aligning with the texture. Do you have any other ideas or could you tell me what I can do about this?
you click on each tile then click on generate, change the shape as you want, and then apply. reset the tilemap collider afterwards
theres a documentation on unity you can read
thanks, done, ive change rigidbody2d to kinematic; colision detection to continous; interpolate to interpolate and than add CompositeCollider2D and adjust collider to my grid, everything works fine
Disable selection outlines in gizmos
That example was for sprites that are all on a single layer.
Oh, anyways I finally figured out what was wrong. Thanks for the help anyways
Hi, my background image dissapears when I switch from Full HD to Free Aspect. I couldn't find any fix online.
Is your background image a sprite or a canvas object
When I click play in Full HD :
Canvas so it's #📲┃ui-ux stuff rather than 2D
Anyway, the scaling settings of the Canvas component and the anchor settings of each canvas object determine how they adapt to different resolutions and aspect ratios
I'm so sorry about that wrong category
https://docs.unity3d.com/Packages/com.unity.ugui@2.0/manual/HOWTO-UIMultiResolution.html
This looks like a full guide
Thank you
Is there anyone here who has a clue about parallax backgrounds? 🙂
Sure, move the layers at differing speeds. Parallax achieved.
Anybody can tell me why are my 2d sprites getting blurry while im walking around
If i put camera inside my player so it follows him as he moves, he will not be blurry, but everything else will
Known to be a side effect of using smooth camera movement together with pixel snapped sprites
Don't know if you're doing either of those things tho
how do i set it up so if i click open on an image in my assets collection, it opens up aseprite
seen some youtubers do it and i have no idea how to set it up
I think it uses whatever program you have set as the default for that filetype in your operating system preferences
ok i figured a workaround
just have the project files open in file explorer and open them in aseprite
they update with no problems
Hi, does anyone have an idea how to solve this problem? the character seems to run into the wall when turning around and I have no idea what's causing it
Is the pivot in the wrong place?
If she is pivoting around her front, then flipping will teleport her into the wall
Maybe you accidently moved the character on the animation, or perhaps you have a collider on your sprite, changing it's scale can move the collider along with it.
Sorry that I haven't been here for quite a while, but I took a break and completely forgot that I wrote this. However, you were right. Now, I tried doing something with the pivot, and indeed, it was about it not being well-adjusted, causing the character to move strangely. Now, it feels even better to play with it. Thank you for your help.
Glad it helped 😄
efmchbdscveb]
anyone here use aseprite because i made a image in aseprite and im struggaling adding it to unity
this is the image in aseprite and i have the clouds saved as a different image so i can have them move seperetly from the background but when i import it to unity i cant get the size and position right
thats the best i have gotten it in unity
Might be Pixel Per Unit in images settings, set both to the same amount
You can also try following these settings since it's also for pixel sprites
I have a question, I'm not sure if that's the right category but still-
I'm trying to make the player appear as a shadow beneath the leaves via sprite masking but I'm facing a problem. I can't animate mask sprite, is this possible using animator? I have frame animation, so rn I'm stuck with a simple sprite mask over my animation
Hey all, I'm having an issue where my sprite in my 3D scene is much darker than it's actually supposed to be (see sprites below it). Is this due to working with URP or is there something else that I'm doing wrong? I've made sure that the light source is pointing directly as it in case that was the cause
What materials are the sprites using
Oh I went to check and realised that I had a color applied to my sprite, which was making it darker 😅 oops
I had selected a darkish gray
That explains it
Note that sprite shaders do not receive any lighting, and lit sprite shaders only receive 2D lighting that requires 2D URP renderer
3D lit shaders may not support all sprite features properly
URP as good as it is for many purposes, may be a bad choice if you want to mix 3D and 2D because it attempts to separate the two
Oh thank you for the heads up. My idea right now is to create a game with 3D environments and buildings, but 2D characters. Would you recommend going with the default Unity pipeline instead?
Or is there a different option you'd recommend?
The choice might not make a difference
If you need to use pixel perfect camera component at any point, or have the sprites be lit by 3D lights, you may prefer the built-in render pipeline because it offers more options for those
For now I'd say do tests for your visuals and keep the option of switching in mind if you encounter issues
You can ask here more about them if those become apparent
Thank you. I may not need either of those, but something I might want to do is to at some point have sprites reflect in 3D water. Would that be possible with URP?
Okay awesome, great idea
That's not an easy task
You'd have to 1. use a shader that utilizes Scene Color information, which may be simplest and cheapest but it cannot do perspective and only works on opaque shaders which sprites normally are not
2. Use render target texutres, potentially with another camera to capture and draw an inverted view of the scene onto water material
3. Implement planar reflections, which is like option 2 but with extra code to offset the RT camera to give the reflections proper perspective
4. Implement screen-space reflections, BiRP supports this natively while URP has unofficial support for it, tends to suffer from rendering artifacts but otherwise is cheap and at least in BiRP is easy to implement
In any case you'll want to decide if you're "working in 3D while implementing 2D things" or "working in 2D while implementing 3D things" and try to solve every problem from that perspective
Even if you don't fully know at this point it's best to stick to one
In my experience it may be tempting to swap when you run into the limitations of either workflow, but swapping is a bunch of work and ultimately trades 2D problems to 3D problems or vice versa
Sorry for only responding now, but thank you so much for the help. I think my idea right now is "working in 3D while implementing 2D things". I'll stick with URP for now and if there are complications down the line then I'll just handle it then.
I believe Aseprite is free if you build it from source code.
oooooh wow THANKSSSS
what is the best way to make a building? In one big part or in many small parts?
Anyone know why this is happening?
Hi all, anyone familiar with Sprite Shapes?
I used this sample
https://assetstore.unity.com/packages/essentials/tutorial-projects/dragon-crashers-2d-sample-project-190721
The river used to be a train track, which came with a set of diffuse main texture, _Mask, and _Normal texture for the tracks
I'm only able to change the main texture, while the _Normal (at least, seen from the screenshot) is still applied
Tried switching to "debug" inspector, but still can't find any slot to change the other texture maps
Original set of textures
The additional maps of a sprite are set in the sprite editor
I've not messed with secondary maps in sprite shape but if it is using the sprite data that's where you edit it
I'm using Unity 2022.3.15f1 and I'm really hoping I just did something wrong and this isn't just an uncontrollable glitch
Hi all, anyone know why my 2 png are imported to unity with a... weird resolution scaling?
They're both 40px per unit
The only difference technically is, the house is part of a split bigger sprite, while the rice plant is a single sprite used whole
Between the house and the giant rice plant on the left
Most likely the plants have been superscaled before importing so sprite pixels don't match actual image pixels
Or it has a bigger transform scale
hi some tiles in our project lacks collision. and it seems to be related to the rule tile itself. since even if i change the sprite and update the colliders by placing new tiles it still lacks collision
the tiles that lacks collision are made with newer rules (as we had a functioning rule tile, and then added som more rules later) and those new rules lack collision
nvm, was grid / none problem in collider
Would be able to ask a question about graphics on this channel?
I haven't found i should ask those
It's basically about why the game looks so distorted sometimes
Which graphics? There is a whole graphics category with
#archived-urp
#archived-hdrp
#archived-lighting
#archived-shaders
#💥┃post-processing
#✨┃vfx-and-particles
uhm i have no clue im sorry im new to this things
Ah, this is probably the right channel for what you're asking
Thank you :)
You'll want to show the sprite import settings
Likely your game window's preview zoom level is not 1x, but less or more so it has to stretch or squash the pixels
this happens
its neck get all messed up
im not an artist, im more used to the coding part, so I really dont know much about exporting
In import settings Compression: none
Fear not, artists know even less about this side of the art asset process
ty so much
it still looks kind of bad
That's a different issue
Resulting from a lack of padding in your sprite sheet
Judging from the distortion the zoom level may still not be right
Might also be that your sprite PPU is wrong
If you want pixel perfectness you must use the pixel perfect camera component
What's the best way to programmatically change a Sprite object's sprite?
For instance, I have a creature object that has a sprite child object. Based on what kind of creature it is, I want to change the sprite to match accordingly.
is there a way i can avoid the aseprite importer modifying the dimensions of my sprite?
the sprite itself is 32x32 in aseprite, but the immporter sets the dimensions to 64x64
i just embedded the package itself and modifiedd it to get what i needded, would be very cool if something like this to avoid the image packer for small, texture sprites was part of a future update
lol nvm it ddoesnt work if your sprite doesnt encompass the entire canvas
ugh
Hey guys, just a question about sprites here, I can’t seem to be able to splice this specific sprite sheet. Since it’s unevenly aligned I can’t splice by grid and the automatic splicing doesn’t want to work either. I’m really set on using this artists sprite sheets as I really like the style (and I was going for a Halo inspired game) . Another question I have is about the background- how would I go about with this sprite sheet/sprite atlas when it’s backround isn’t transparent? Also FYI I’m doing this on my school computer only (because I don’t know how to go about the hassle of getting a license for my pc at home) so I am limited to say the least. Thanks for reading
No real way around it except getting a properly aligned sprite sheet, or slicing manually
The background must be removed in an image editor
You'd prefer to be working with proper development assets instead of rips
If you mean Unity license you can get one just by signing in
Yes, when you click on a slice you see its information in the sprite editor
There you can set its name, and the slices will be sorted alphabetically in the project window based on that
Got it, Much appreciated !
after 2 and a half days of bashing my head against a wall... i finally made my first tilemap
now i have to find the tutorial to figure out how to make them do things when clicked
wish me luck guys
If you can tell what things it needs to do it may be possible to provide some directions
basically i want a sort of menu to pop up when a tile is clicked, with options to build, harvest, etc
i know i have to put some scripts and stuff in
gonna poke around google while i make some pizza
That takes many features working together, best cut it into smaller challenges
Yeah that sounds about right. I'm working on just making the tiles interactive. I can add the specific interactive buttons/features later I just need to start with the interaction
I think that's where I should start, anyways, if you think I should start from another angle I'm open to ideas. I'm a complete beginner on this stuff. My only software engineering experience is a Java programming class from high school
Do you have any tutorials/source material/etc I should start with?
The Tilemap Extras package has importable examples for various things to do with a tilemap
One of them might've been related to clicking tiles to change them
Alright cool I'll mess around with that and see what I can see, thank you very much. Do you know if those examples also come with scripts?
They do
The samples tab is in the package manager on each package that has them
Big thankies
im learning so many big words today like "orthogonal"
i dont understand why my tilemap scaling went wrong
for optimal size and pixel consistency i want to use 10 ppu but it results in this
Your tiles are 16 pixels wide, and it looks like your character has much higher PPU than 10 (or a smaller scale)
If you want 10 PPU you need to author your characters and tiles with 10 PPU in mind
It determines how big they are relative to each other and you won't be able to change that later, without losing pixel consistency
Someone have an ideas how to create shadow caster for Tilemap :?
I've found the solution by myself 😁 by just adding shadow caster 2d and set casting source to composite collider 2d
Is there anyone who can answer my question?
why is my sprite pixalated
Game window is zoomed in using the "scale" slider that's barely visible
even without zooming in it seems off and pixalated
It's too small or its PPU is too large relative to camera size
how to fix dis?
Make the sprite larger, make its PPU smaller or decrease camera size
Nothing about the sprite itself is pixelated, it's simply too small to be represented by display pixels
What does it look like after fixing it
Pretty general question; Is it possible to have effects manipulate the environment itself? Maybe it makes sense to say on the renderer side. For example, a black hole that sucks in color.. the sprites themselves would be unaffected, it would just be an overlay effect. Or a ripple that goes across the camera overlay as a wave
what is the best free 2D software for game art?
That's 100% subjective and depends on the type of game art you make
But I wouldn't miss an opportunity to praise Aseprite
thanks for ur opinion 🙂
If you have clearer examples of the kind of art and assets you want to make, I can give more precise recommendations
I really like smooth textures. Nothing realistic, I love quaint artwork, that look kinda cute-ish
this is an example of something i quite like
obviously not massive detail but you get the jist
or this
This one has extremely densely packed visual details and texturing, even if it doesn't make much sense at places
That happens with AI generated artwork like this, so I can't point to any specific real techniques
People usually use Photoshop to make art that closest resembles this, using digital painting and meticulous rendering of surfaces and light
Awesome, before I can afford photoshop what would you suggest is the best to learn for free
This style on the other hand requires much less rendering due to relying on solid colors and gradients a lot, so in addition to Photoshop you can get by with digital painting oriented programs like Clip Studio Paint and Krita
Legend, you really know your stuff
does anyone know if you can use a Wacom One with Krita?
Big Krita fan here. And. Yes.
amazing jusr what i want to hear!
Hey guys, its me again. I'm using a super simple script to have my 2d character face/rotate towards the mouse position
Vector3 mousePos = Input.mousePosition;
mousePos = Camera.main.ScreenToWorldPoint(mousePos);
Vector2 direction = new Vector2(mousePos.x - transform.position.x, mousePos.y - transform.position.y);
transform.up = direction;
However, it causes a lot of jitter with the player camera. Any advice on how to fix this?
Where in the frame are you running this code, and how are you handling your camera?
I'm making my level in reference to being on a 1920by1080 screen, however, if i switch to a different screen size, the borders i have set change, how do I account for this effectively?
hey guys! for some reason my 2d sprite has a white line over it sometimes. anyone have an idea on how to fix this?
it goes away when i disable gizmos
nevermind
i just had to unselect the player
It’s a Cinemachine virtual camera and this script is being ran in my player movement controlling script
I believe the issue is that the player himself is jittering as everytime he moves, it rotates a bit to update and face the mouse position. If I solve this I’d likely fix the problem but I’m not sure how to go about it
I meant, in update, fixedupdate? And when do you have the cinemachine camera updating? Generally you want the camera to update after all character movement if you are following the character.
hi guys! I am using the aseprite importer for my tileset, but i have seen that I have version 1.0.1 which doesn't support custom physics shape for each tile, but a newer version (1.1.0) has it. The thing is that I am not being able to update it, does anyone have any idea about it?
Just a programmer learning to draw
I need some help with shading and shaping
can someone give me some feedbacks?
I want it to be a top-down sprite if you wanna know
Different screens (and frames if on browser) have different aspect ratios
Unity normally matches camera height and screen height, and adjusts camera width to fill the screen width
There's probably some way to flip this behaviour to match width if needed, but in either case you need "safe areas" on the horizontal or vertical borders of the scene
which tool is used to make this red mask map in unity in the happy harvest demo?
I ended up just making it so i use screen width clamps
It looks like the normal map ran through a step function to isolate the highest and lowest values meaning the ones with the sharpest angle
Not sure which tool specifically, a lot of them can do that
They could have just drawn it.
Hey guys, I have a ScrollView (DeckComponent) that contains 8 card rows. Everything seems fine except for the fact that the scrollview doesn't scroll, it just keeps bouncing back. Any idea why this might happen?
The "View" in that tree there is an image with a mask
send your components
The "Content" object is most likely not scaled enough to fit all of the cards. You could do this manually, but a more scalable solution is to do it automatically. For example, assuming the CardRow objects have a horizontal layout group, you could attach a vertical layout group to "Content", paired with a ContentSizeFitter that has the vertical scaling set to "Preferred size" to make it fit all the card rows inside it
They go into detail about it in, and everything else this e-book
https://unity.com/resources/2d-game-art-animation-lighting-for-artists-ebook?ungated=true
Though you can see they made it manually out of vectors on page 26
i guys im looking for a good rpg dungeon assets for my game anyone know something?
Question about 2D (not sure where else to put this). I'm sorting layers by pivot points, but I'm not sure what to do about the trees in my world (using tilemaps, btw). If I put the trees in the world as a separate tilemap layer, they don't really have pivot points right? Right now, I've separated all trees into 3 different parts so it sorts correctly, but it still has kinks, and I feel like that's not the way to do it. Is there something I'm missing?
There are "gameobject tiles" that may solve the pivot problem
Once it's solved you probably don't need to separate the trees into parts
Unless the top part is so big that it can cover sprites that are "in front" of the tree
It's not uncommon to have the trunk and leaves as separate sprites
Yeah rn the trunk, tree itself, and then the leaves are all separate on different tilemap layers
the trees will never be cut down or anything
i just need them to be able to be walked in front of and behind
I need help with tilemapping
i got no idea what im doing and not to sure what i should be using
as in - using the 2D tile system?
Unity’s Tilemap system makes it easy to create and iterate level design cycles within Unity. It allows artists and designers to rapidly prototype when building 2D game worlds. In this tutorial, you'll create a Tilemap and explore the Tilemap system including Tilemap settings, and you'll use the Tile Palette to edit your Tilemap.
yes, im not gonna lie i just spen 1 and half figuring it out
the issue was it was a tile set and not individual 64 x 64 tile
No lie, that's what a LOT of us do when we're new to something. You should have seen the mess I made of using the new input system
well glad you got it
good luck with your project
Does anyone know how to make the tilemap collider just be a box instead of trying to fit the sprite?
click on the tile prefab in the project window and you'll see a collider type option in the inspector that you can change to grid from sprite
Hey does anyone know how to import things from Krita as it just doesnt show up
You just export it from krita and move it into the assets folder. That's it
You have to export to a supported file format too I guess
I want to make a pixelated 3D visuals, do i use a 2D tool?
Do you have an example of what you mean
It doesn't sound like you mean having 3D visuals and then simply pixelating them
Like chained Echoes
Gives 2D vibe
While being 3D
The art of that game is 100% 2D
There's depth using an isometric perspective but that doesn't require 3D
Oh, makes it a bit easier to do, thanks for the insight
Anyone know an alternate method for 2d pixel perfect? I tried using the Pixel Perfect Camera extensions, and it does what it's supposed to do, but it makes the camera's movement very jittery at slow speeds, and that stops happening as soon as I disable the component. I'm trying to recreate the genesis sonic games style in terms of how the game should be rendered. Apart from the 4:3 screen ratio.
Wait, does the Shadow Caster in Unity ONLY work for editing the shape of each individual shadow? there's not one that automatically reads the shadow of the object and cast a shadow from it?
Would it be possible to add a dithering effect to something like this?
I have pretty big sprite sheets, and none of them are translating well to unity even though I'm keeping them under the 2048x2048 limit
sprite type is multiple, no compression, on point no filter
hey guys i am very new to all this and just doing this project to learn some things but in unity i got my little fella to move left and right with animations got my parralax setup (with my layers and the rate at which it moves bound to the Z coordinate of the layer when in 3d mode.) however one of the layers i would like to stay stationary or even LOCKED to the camera so it doesnt move at all AND i cant walk out of it. but i dont know how and i cant find anything on it.
What do you mean by "not translating well"
Parent it to the camera or use a script to set its transform inherit all motion by the camera's transform
Parallax effects usually mean in practice that one transform inherits a proportion of the camera's movement
This proportion visually translates to depth
Inheriting 0% makes it look like the object has 0 depth
100% makes it look like it's infinitely far away as it moves in sync with the camera
50% is somewhere in between
Negative proportions make it seem like the parallax layer is "poking out" towards the camera
ah sorry i already figured it
i should have said
my parralax was set up wrong
thank you though
i believe i will be here
VERY oftern
xD
off to work with me for now though
nvm im stupid i just needed to set the max size to 4096
I think the shadow caster inherits the sprite's physics shape when its assigned, or there's an option to, but I'm not sure
You can implement dithering using a Custom Lit Sprite -Shader Graph template, if you know how to implement dithering and have a general idea how to do that to the 2D light texture
how do i make an sprite of an png image?
i changes texture type but it wont show up as an sprite
Sprite type textures can be applied to Sprite Renderer components in the sprite field to appear visually
Clicking and dragging a sprite type texture asset into the scene automatically creates a gameobject with sprite renderer component and the sprite texture assigned
Remember to apply changes to the texture asset first
No idea on that part. This is really my first time messing with the 2D sprite tools in Unity. Got any vids/resources on that?
I'm using tilemaps and URP; I was trying to do the pivot point sort for the player VS the tilemap, but it doesn't really seem to apply as a whole with Individuals (obviously) and as Chunks it's considering the entire tilemap. How do I make it apply to individual IF my sprites are larger than one cell?
(just to show) my sprite sheet looks like this so when the character runs through the forest sprite or that pillar or cacti, since it's made of 32 x 32, despite 16x16 division, it's treated a bit "weirdly".
Is there a better way to handle this?
(Here's a recording of what's occuring just incase I'm being too obtuse)
Is the only solution to change my tilemaps, so 32x32 objects are on 1 map, 16x16 on another etc etc?
oye, why am I seeing a sliver of the sprite next to the other in the sprite sheet below the plant decorations..? What's that about.
Hm, I found someone telling me to use a Sprite Atlas, and used it and it seemed to work, but if someone wants to explain what exactly happened there I'd appreciate it.
I build a free tilemap editor that can export maps to Unity Tilemaps 🙂 lemme know if you want to try it!
These happen because the color sampling is a bit inaccurate at sprite edges and may incorrectly use the color of the pixel next to the sprite on the sheet, especially when not using Pixel Perfect rendering
The fix is to add at least one pixel of padding between each sprite
Sprite Atlas has a feature to add padding which is why it works
Aseprite can also do it when generating sprite sheets, but I don't know if the exporter package does it
what is better tilemaps or sprite atlas?
can someone with experience tell me a little bit about it
They're not alternatives
A sprite atlas compiles all sprites to a single texture while keeping their slice / tile references
It's for optimizing draw calls and texture loads
if in the future I want to make procedural generation is there any way to combine both tilemap and sprite atlas
for example a tree only has collision on its body but not the leaves and the tree must be counted as one object
but when I try to fit a tree into the tilemap
it isn't
every cell is counted individually
should I use trees as prefabs with sprite atlas instead?
A sprite atlas has no effect on how sprites work or how you use them
It happens entirely on the back-end
As I said it keeps slice and tile references
In unity tiles do not have to occupy just one grid square, but will if you slice them by grid
Your tree sprite can be a tile as just one big slice
if I import the whole tree do I have to make another tileset for lets say 48x48 big things?
No
A tileset can use any sprite from any and all sprite sheets
But you may want to in the situation that you want multiple different grid sizes
If not, then no
I would have separate sprite sheets for different sized sprites/tiles just so I can use the same slicing settings for all of them
Otherwise it'll require manual slicing
Using a sprite atlas on top of that would just mean they get stored together in texture data
I clicked the png image, changed texture type from default to Sprite and I still cant select it as an sprite and when I try to drag it into the hierachy it doesnt allow me to
Probably missed some step, I'd assume
I'd look for tutorials or courses to see the process precisely
i have a sprite that i made a material and the sprite is not lookin like in aseprite is in 2d
sprite has a box collider on top and circle collider for the body + legs for smoother movement, for some reason it gets stuck on the wall when i jump into it, it wont let me jump again but i dont know why thats happening
the wall has a tilemap collider
Likely the corner of the box is getting stuck onto the corner of another box collider
The physics engine can't really figure out when the border of two colliders should be "seamless"
For that there's the composite collider component that should let the tilemap's discreet colliders combine together
what if i use an edge collider instead, make it 1 straight line?
Sure, but you'd have to do that for every wall manually
so do i get rid of the tilemap collider or do i keep it with the composite collider?
Keep
and how would i stop the sprite from sliding down the wall when i jump into it
like i want it to just fall down with no resistance
You can try setting a frictionless physics material, but it really depends on your movement code and how much they utilize physics
Ohh. I didn't even know that was a thing. So the Sprite atlas then takes all the pieces and just adds that padding automatically, neat.
ive done that now the sprite is falling down but it still gets stuck sometimes when jumping up a wall
but it doesnt happen consistently
You could ask for assistance in #💻┃code-beginner
This place is mostly for the 2D tools and assets
Hi, im trying to make one of those piano players in unity, but i'm running into an issue which i'm not sure how i should handle, im currently moving sprites to represent the note duration but the movement looks very choppy/glitchy?, and i don't know whats causing it but the sprites sizes/distances seem to be changing because of rounding errors? any help or pointing in the right direction would be appreciated :)
i don't know how well the video show the issues but you can see some squares that are paticularly close to eachother have their gaps change in size
There is a sorting issue in Unity? I thought this would be automatic
It flip flops between which is in front
Oh, ok. It is easily fixable manually. strange that they would include that in a tutorial project, but not mention it in the tutorial. maybe i just missed it when scanning to see if they covered it.
Hello, I'm starting off on Unity by creating a 2d platformer and I want the player sprite to be a rectangle with rounded corners, anyone know how to do such thing? I've tried doing it in ms paint and visually it works but the hitbox is still a normal rectangle which I don't want
The hitbox will be determined by what kind of collider you use. If you want to use the sprite's actual shape, you'll need to set up the physics shape in the sprite editor. Otherwise, you can approximate the shape you want using box and capsule collider2ds.
alright thanks
Pardon me, I have what I hope is a very basic editor question:
How can I zoom in / enlarge 2D sprite keyframes shown in my Animation tab?
(I recently got a 1440 monitor. The animation tab depicts keyframes at their native size, which means for me they're... less than half a centimeter tall.)
this has probably been asked before, but i haven't found a definitive answer. is there a way to tune the 2d physics engine to 1 pixel per unit? i'm having issues with jittering and i'd really like to stick to 1 pixel per unit for coordinates
The physics engine has no clue about pixels, they are only used for rendering
but it does have a clue about scaling, no?
What do you mean by scaling? Physics work purely in floating point values
This means that to the physics engine the "pixel grid" is just a grid of abitrary size
Maybe you can snap rigidbody positions to such grid in FixedUpdate, but it might not work well
but there's a difference in precision between 1 pixel per unit and 100 pixels per unit.
i am not planning on using rigidbodies for physics. i'm just trying to make a simple character controller
Unity only does physics with rigidbodies, as far as I know
there's still raycasts / boxcasts and overlaps
are you saying that has no affect on pixels per unit scaling?
for example i took a character controller i found and immediately had problems with jittering and falling through platforms after scaling the velocities and gravity up to match my pixel per unit scale
I think I misunderstood what you meant by pixels per unit
yeah, all my assets / sprites are set to 1 pixel per unit. i prefer this because it makes positioning of objects a lot easier
In Unity one unit equals to one metre
I don't know of a way to change this really
Or to "tune" the physics in a different way
I believe this means they're optimized to work around real world object scales
If this is the problem you'll have much easier time solving the problem if you increase the PPU and simply enable grid snapping with a smaller grid
i actually meant positioning objects with numbers. it's a lot easier for me to think in pixels rather than decimals
grid snapping only solves a part of the issue
Still probably easier, considering the other option might be impossible
Could try asking in #⚛️┃physics if they know more about changing the simulation scale
can someone help me with an issue im having regarding importing aseprite animations and the sprite editor?
What material should I read to learn how to properly support different window/screen sizes in my game? As it stands anything that isn't 16:9 is breaking the CameraConfiner2D
Mao by groups what are you specifically referring to?
cause im not sure what you mean by this exactly
yeah so adding sorting layers didn't fix it
since the red tilemap is still above the other in the sorting layer
for anyone else wondering my issue I am trying to solve. I am trying to figure out if its possible to emulate the effect on the right on the left. The left is my desired outcome but is using 4 tilemaps instead of the left which uses 2 and is far easier
Ah, maybe the groups only specific to the maps themselves
the ordering of the tilemaps should already have priority layering, no?
by priority you mean the "Order in Layer"?
when you create the maps and child them to a GO it's kind of like the UI
oh you mean like in the hierarchy?
Yeah
i can test if changing the order of the GOs in the heirarchy changes anything
I thought you had it working up there, or is that just something you did in paint
up where exactly?
your image lol
oh with the left and right
no so the way i got the right to work was
i had to make a tilemap for each height in the game instead
so instead of just having a floor tilemap
that handles all the floor since tilemaps can have height now with their z value of their position
so it went from 2 tilemaps
to 4 tilemaps
so id have to have a tilemap for each height in my game
also after checking
when two objects basically share all the same info on order and position
changing their order in the heirarchy doesn't do anything
looking at some older project I do have it ordered specifically in the hierarchy, and I think the layer groups are more specific to the tilemap than the scene
annnd unity crashed
and when I say sorting groups I mean the sorting layer. Sorting groups are just another abstraction for sprite sorting, im actually not sure if it applies to the tilemaps though
I see, but I am still getting the issue since i put the floor and the red layers in
but it causes the same problem
cause the red is just still listed as above the floor in that heirarchy
Ok, yeah it seems that hierarchy does affect rendering order and the sorting layer is per map. I'm pretty sure they all render at around the 2000 default transparent queue, but I guess the ordering overrides other maps with similar values.
curious why mine was updating then when i chagned it my simple test
but im curious if you think there is a solution then that doesn't require adding new tilemaps
im not too sure how you'd do it without multiple tilemaps, but there could be more to tilemaps than I remember.
that is, if sorting layers isn't what you're looking for
after spending hours working on this today / tonight, i figured out the root cause of my issue.... it works a lot better when "Simulation Mode" in the physics options is set to "Update" instead of "Fixed"
they dont seem to be, but i appreciate the help regardless
Hello, I'm doing bone animation and I need to change the sprite of an already finished bone animation, how can I do this? (if this is the wrong channel for such issues, I'm sorry in advance)
Usually bone and sprite animations are two different things
What does the setup look like in your case?
Animators override component properties, for bone animations it's the transforms, and for sprite animations it's the sprite reference
If only bone transforms are overridden you should be able to change the sprite reference as needed
And how can you easily replace it with a link?
I see, 2D rigging
With that feature I think the intended way is to use the Sprite Swap
https://docs.unity3d.com/Packages/com.unity.2d.animation@9.0/manual/SpriteSwapLanding.html
Hi Everyone! These import settings options for sprite textures and such, is there no way to set defaults for all sprites that I import into the project?
Use the top right sliders icon to define presets for quick access
If you need one of the presets to be the default, there's probably a way to do that too
https://discussions.unity.com/t/how-to-change-default-import-settings/157318/6
Thanks! Helped me a lot!!!
Is it possible to switch which tile palette this tilemap is using? I want to switch to a different palette that uses the same palette layout, but I want to preserve this palette as well for other tilemaps that use it
I need to rename these active tilemaps, but I don't know how to do that, or even where they are. Can somebody tell me how to do that?
I have "Tilemap_Background" and "Tilemap_Ground"
ok I'm a dumbass
these are the names of the empties they are children of
is there a way to make the normal of the start and end points of an edge collider NOT left or right?
for example, my game is built using edge colliders because the platforms can be any shape. i'm implementing one way platforms but running into an issue because the normal of the edge collider start and end is left and right (90 degrees), but i also don't want the player to be able to jump through walls either.
is there a graceful way to handle this? it looks like there's "adjacent start point" which sounds like it might be helpful, but it doesn't appear to do anything
Why not use Polygon collider instead of edge collider? https://docs.unity3d.com/Manual/class-PolygonCollider2D.html... it would be much cleaner and easier to set up.
would i still run into issues with platform ends having normals that point left and right?
Not what you mean but it is all connected in one shape
i'm not sure that makes sense in my case. only the tops of the platforms are to be collided with
but platforms can have walls
You can also edit the physics shape in the sprite editor https://docs.unity3d.com/Manual/CustomPhysicsShape.html
I feel like using polygon is just better than edge colliders in any situation of a sprite but maybe if you have an example of what you are trying to achieve... Sounds like you might be wanting to go one way through a collider? That could be done by using then triggers and then custom logic.
i'm trying to achieve something very similar to maplestory. the platforms are connected to the sprites in a way, yes, but it's only the top of the platforms and walls. that doesn't make sense for me to use a polygon collider
With a polygon collider you can have only the area of your sprite that you want for the collision.. much like the edge collider. But it's all connected. The vertices can be edited manually like an edge collider or with the physics shape you can make it more automated if you are using a tilemap.
Just only include the top of the platform and whatever else in the physics shape or edit what you want out manually
how would that work with slopes?
oh nvm that's not an issue
i guess i still don't understand how that would help me because the sides would still have left and right normals
i managed a workaround anyways. i just get the edge collider that was collided with, grab the start and end points, and if the player's box collider contains either of those two points, ignore them
@sage girder this might be useful in your situation
https://docs.unity3d.com/Manual/class-PlatformEffector2D.html
will Unity render objects that are outside a 2d camera's field of view?
No
i did look into that, but it didn't seem to do anything. i need a rigidbody for that to work, right? i am not using a rigidbody for my character controller
Hello everyone !
I am not sure which Artist Tools channel to post that in, but I have a 2D spritesheet animation workflow question.
I managed to find some nice Open Source Assets, including the spritesheet of 600 different units. I will sort through these and repackage the sprites I want in the form I want, but I plan to use 200 sprites from these.
I want to use them in a game, using spritesheets containing Idle, Movement, Attack, Hurt and Death animations.
I recently followed a tutorial to understand how to use a spritesheet to animate an entity, using the state machine or the other thingy, and I already know how to slice a spritesheet into multiple sprites, but I did these manually.
I am now looking for ways to do that procedurally, without having to slice and pick the dozens of sprites from each of the 200 spritesheets, then do the animation handlers one by one.
Is there a way to automate this process ?
(the spritesheets come with plist files, which indicate the different states of animations in the spritesheets)
I expect so
You can look up how to create sprite slice and animation assets procedurally, and figure out how the plist files convert to that
But my hunch is that unless you know precisely what from and to you need to create the conversion process, it's likely not worth it
If the sprites are in a grid, the grid slicing should make short work of them
Additionally you can multi-select sprite slice assets and drag them into the animation timeline to add them up
If you have multiple units reusing the same state machine you should look into Animator Override Controllers
oh, I wasn't sure about that.
It will already let me reduce the time spent on the animation half, at least for the entities with identical state machines ! 🙂
There's also another workaround that could be an option
While Unity does not recognize "sprite sheets", but rather pools all sprite slices by their unique ID, classical sprite sheet animation where states are encoded by sprite sheet index / array position will not work
But that functionality can be implemented with a custom editor script that sets Sprite Renderer sprite reference from a sprite array that represents the sprite sheet
Then you make animations by changing the custom component's sprite index rather than the animator's sprite reference, and can swap the array that represents the sprite sheet at will
But I recommend that only if it seems you'd benefit from it, in case you have a lot of sprite sheets that have the exact same sprite positions relative to each other for animation sharing
yeah, not sure that the best Idea for me, I'm a beginner in most things Unity 😄
I'd try to figure out the best workflows Unity can offer you out of the box, like the ones I mentioned about animation sharing and quick creation
They may be a bit under a rock as many seasoned users miss stuff like that
But automating the import process or creating the virtual sprite sheet component both require at least some understanding of editor scripting so those could get swampy
Hey all, im looking for some help. Im a UX designer by day, and learning unity art by night. I cannot for the life of me figure out how to make buttons behave. Is this the right place to chat?
my quit text box is down here, but it is inside the button above

Hello everyone I need help. I have a ready-made bone animation and I changed the sprite on it via sprite skin, how can I link the changed sprite?

#📲┃ui-ux might know more
thx
idk why the changing of the collider's shape and offset isn't working
I think I am going to try one last ditch effort to see if anyone has this knowledge on how to solve my problem.
I am working on a 2D isometric game. Since switching to Z as Y. The map looks a lot better however I have encountered a problem that so far. After 5 days of searching, and checking what feels like every crack on the internet, not a single answer has revealed itself. Hense why I am here on my last ditch effort before maybe I scrap the entire idea or something I am unsure.
The setup: In picture one you see that my game currently has 3 tilemaps. The tilemap for the floor, the movement Preview (which are the blue tiles you will see in other pictures) and the attack preview which are the red tiles.
The problem arises with the fact that since the Movement and Attack tilemaps are higher in the sort order, while they properly render above their tiles. They should be covered by tiles that are higher up. The second picture shows the problem, then hopefully the third picture shows what I am trying to produce (the third picture was produced through just hand doing in on the tilemaps). In the third picture you can see that the top 3 red tiles are being overall covered by the higher up tiles.
The main issue I have found is that because the floor tilemap is accounting for multiple heights. I have found 0 way to do this effect. I have tried what feels like every option from materials, Render Queue, Sort Order, Order in Layer, Transparency Sort Axis. Genuinely everything.
I apologize for the long post but I am just hoping some soul sees this and knows how to fix this problem I have been having that makes me feel like I am at my wits end.
what are the best softwares for making simple 2d graphics for your game? is Adobe Photoshop good?
Why are those layers higher in the sort order? That will override axis based sorting.
trying to set them all to the same sort layer and order in layer causes z fighting and its literally just random if it decides to work
Can you set it to z and y, and add a tiny offset to the overlays' position? Or add a slight offset in the shader for the overlays?
i was kind of trying that but it didn't look good
if you are willing to test it and get a decnet lookings version that would be awesome
I don't use the tilemap at all, so I'm the wrong person to be testing anything.
You could also handle sorting yourself
@bold remnant There's a dedicated page in the docs for isometric tilemap sorting iirc which I can't fetch now
Is there any unity export to help me?
I need to make a simple game with this toolkit
@modest cargo
Hi everyone, I'm new to unity.
I want to ask should I used Tiled Editor or use built-in Tile Map of unity for creating 2D map & level? I hear that people said i should use Tiled for more flexibility.
Thank you :3
What were the reasons people you heard say to use third party Tiled?
I think this is the one
Not a hundred percent sure it helps in your situation, but perhaps might
Yeah I've read it before. Doesn't help my specific situation sadly
Hey guys, i got a spritepack for a modular animated character. I understand how the spritesheet works, but i think unity doesn't offer all the features out of the box as i need them (e.g. flipping sprites horizontally during animations) - what's the smartest way to solve this? should i script the keyframes manually?
You can do that or cut the animation into smaller animations 🤔
Not sure myself what might be easiest but I guess just try it out, you are on the right path
Btw I wanted to ask, is there a way to make prefabs out of tilemaps
Hello! Does anybody know if its possible to align handles of points whilst editing the sprite shape controller?
I'm using a ruleTile that has tiles set in a TileBase
code:
var t = oreTable.GetRandomItem();
if (t.id == 0)
groundTileMap.SetTile(new Vector3Int(x, y, 0), groundTile);
else
groundTileMap.SetTile(new Vector3Int(x, y, 0), t.tile);
As you can see the auto tile rule doesn't understand there's a tile a single tile not part of its tilebase at a neighboring coordinate.
a) is there a way to have the ruleTile adjust if it finds any tile is found (aka not one part of the ruleTile rules?
b) is there a way to have some tiles in the ruleTile [let's say either in the TileBase or perhaps palette - these two terms might not be accurate] that aren't involved in the actual rule. e.g. i'm 99% sure that the following code wouldn't work but something like this:
groundTileMap.SetTile(new Vector3Int(x, y, 0), groundTile TinOreTile);
hopefully obviously I want it to look something like this instead:
the hack I had to do to accomplish this was to make another tilemap and unfortunately an ore tile is rendered on top of a full dirt tile behind it - once digging/mining of the ore tile is complete, it removes the dirt tile behind, then the ore tile.
Hello, I am very new to unity and have been trying to make a starter project with different assets from the unity store. As of right now, I am trying to make a background with assets and a tilemap, so far I made a floor but now I want to make a background, the problem is when I drag different parts of the background into the same tilemap that I used to make the floor, it looks so out of proportion. The mini blocks around the middle are suppose to be clouds but each individual block is a cloud and I do not want that. I want the clouds to look normal and big but I don't know how to do that.
good afternoon Hollow King. I'll be honest, little hard to make out what icon is considered a cloud. I'm fairly certain that the icons you have listed below look like they're part of the same tileset so I'll take a moment to think that resizing your tile sheet is not the answer. Are you certain that the tiles that are blue in color aren't individual slices of a cloud which make up the top and bottom of a cloud or maybe even that these tiles don't represent a cloud but maybe a river appearance?
do you happen to have a screenshot of what perhaps a scene looks like from the asset store to provide perspective?
sorry, i took a break from trying to fix it, These are the original assets that i got from the unity asset store
u can see that some of them have different clouds
but when i dragged them into the first tile map i made
this one
you can see the differenet cloud blocks i put in, in the bottom left
When i tried to put the into the game scene, the clouds where way to small and I couldn't combine them to make a bigger cloud
this is what the original asset pack for the clouds look like
i want my background to look kinda like that
Do your tiles from different sources have the same PPU?
i have no idea what ppu is
Pixels per unit value
If you want pixels of your sprites to be the same size, they must have the same ppu
This will mean they will have a "correct" scale while keeping sprite resolutions consistent
so its not smart to mix different tiles?
Rarely
You tend to get different resolutions or tiles for a different grid size
And differing art styles also
how do i check what size to make each square
To know the correct PPU, count the number of pixels "one tile" is wide
i have no idea how to check lol
You could count them one by one
Or use an image editor with a marquee tool that tells you the selection dimensions (or potentially the sprite editor if that one tells you the slice size)
this is the section i am on right now, im not sure how to count the pixels from here
I'd open the texture with an image editor
You have little chance of counting it from a sprite with that much solid color, from a small preview thumbnail no less
No, not an image editor
it also filters images when zooming in so it smudges out pixel art
is there an image editor that automatically comes with windows 11
or do i have to download one
Paint, and it does tell you selection size
i got to this point here
but it seems like they all have various sizes
Doesn't look that way
Select one of those blue squares with the marquee selection tool and one of the numbers at the bottom bar reports the selection dimensions
Eyeballing it it looks like 64x64 but I can't say for sure as your screenshot appears zoomed in or out
ok
The rest of these are one grid square in size, whereas the long ramps appear to be 3x2 squares
The square size / ppu is often reported on the asset page, but often also not so this is a good skill
Seems right
and then from here what happens?
This means the sprites should have 48 PPU value in their import settings, and so will every other sprite also, if you want to keep their resolutions consistent with each other
Your sky tiles appeared small not just because of potential PPU discrepancy, but because the grass tiles you were combining with them were designed to look larger relative to grid size
The leafy details were much larger within one square compared to the grass tiles that were intended to go with the cloud tiles
Now when you use the tiles from this tileset, they should all appear just like in the example
That said it's not a hard rule to not mix different PPUs, but more of a stylistic rule that pixel art is supposed to obey
Plus it helps you keep track of how big every sprite is relative to the grid
ok
For example if you have a character sprite that's 48 by 96, you know that it's exactly one tile wide and two tiles tall (with 48 ppu)
Hopefully it's all a bit clearer
Why isn't the shadow caster using a sprite renderer not working properly? It's acts like the transparency of the sprite is solid:
This is how it should look (I did this by using the shape editor and manually setting points):
Does anyone know how can I stretch the sprite to fill the bounding box of the object?
Change the transform scale or author the sprite in a way that it fills a square to begin with
im not sure where to find the option to change the size of the palette to fit in the boxes
how do i stop the empty pixels from getting filled in?
how can I draw a 2d map for a game? If I want to make a cave that has twists and turns, for example, tilemaps wouldn't work the best. so how can I draw a 2d map then get collisions for it?
right now i'm thinking of just drawing a map then using a polygon collider but this just doesn't seems like an elegant solution. thanks!
nvm, fixed it
You should be saving to png or tga, so alpha is preserved
After that it gets applied automatically if you're using a sprite type texture in a sprite component
(if you're using a custom shader you'll have to use the texture alpha when sampling)
deleted and readded the sprite renderer component without changing anything and somehow that fixed it, thank you
What kind of map exactly? Why are tilemaps not an option?
i finally managed to fix the tilemap sizes and implementation. Now the square goes behind the tilemap, im not sure how to make the square go infront of them instead of behind
What is the square meant to be? What do you mean by in front?
If it was behind, I assume we would not be able to see it
the square is a placeholder for the main character, you see how the top of the square is very slightly behind the blue sky, if i go higher the box goes behind it
the dark blue is literally nothing thats why you can see the box
That's important info
@cedar barn https://docs.unity3d.com/Manual/2DSorting.html
All 2D renderers utilize these sorting priorities
ok
tilemaps are more blocky if that makes sense. I want a custom drawn map that can have smooth curves
so a rock for example
I kind of want a smooth rock rather than a pixelated one
Tilemaps don't have to be blocky nor pixelated, strictly
But if you want very smooth organic curves of inconsistent sizes that never repeat then you'll probably want something drawn
You can make big sprites that use the polygon collider, in which case I guess your only worry is performance potentially
Polygons are kind of expensive colliders, so if you find them to be a performance bottleneck, you could slice your drawn map into chunks in a grid
Alright, thanks
I am trying to make animations for 2d spritesheets. I am using this tileset:
https://finalbossblues.itch.io/time-elements-character-core-set
Long story short, each piece of the sprite is broken up into a tilesheet that is 23 x 4 sprites. To make a character, I have to layer the sprites together (hair, head, body, and so on).
I want to create a set of animations based on this (for example walking downwards is Sprite Index 0-1-2-1). I want to apply this to all of the sprite sheets, so that I can just build it (similar to how it would work with 3d models). Is there a wayt to do this easily? If not easily, can I automate creation of animations, so I could define this and then generate the animations for every sprite sheet?
You can just have a single animation and swap the texture using a shader, or you could make one set of animations and automate switching the textures into multiple assets. Really depends on your workflow preferences.
You could also probably automate converting the modular sheets into sprite libraries.
I think you could make a component that holds an array of sprites, and sets the sprite renderer sprite reference by the index of the array, and then you animate the index rather than the sprite reference
Then your characters can share the animation with just a swapped sprite array
how do most people handle making maps in top down LDTK
i've drawn the level layout plans, then i'm trying with 4 layers and i'll use auto mapping later? is that the right way to do it or is this weird
Hi everyone
I need to add many (~1000) poly/spline shapes to my game as part of Level Design.
I tried Sprite Shape, but it "overworks" (does stuff I didn't ask it to). I want the outline in white (the one which actually follows the points I set) to be the final shape. Instead Sprite Shape extends the shape outwards, even worse - it doesn't properly "merge" sides (top right corner) depending on the angle (My Corner Threshold is already at 90 maximum). I found each vertex has a "height" attribute, which affects extension distance, but it needs to be set manually for each(!) vertex and its minimum value is 0.1 (instead of 0).
Any way to prevent extension entirely?
I don't need any edge graphics, just fill graphics.
You can have a fill without an edge on a spriteshape.
That sounds like what I need, but how?
It's been a couple of years since I have needed to, but from what I recall you just don't define an edge? Might vary with version.
I didn't, the screenshow above is pretty much its default behavior, and I couldn't find an edge-parameter so far.
I found it: you need to create Sprite Shape Profile and it has the necessary settings
Anyone knows the corresponding Sprite Shape shortcut to "Start editing the Shape in the Scene View"?
I couldn't find in Unity shortcuts window
I dunno if there is one
hi, is there a reason for why my one way platforms aren't working? i can't jump through from the bottom
Is your character using a rigidbody? This is just a hunch but I feel that could be something
Well what did it turn out to be
One thing I've learned is that no matter how smart you become at this stuff, the dumb mistakes never fully go away
They're just another part of the troubleshooting process
For my game I need some objects to move with other objects but they can't just be parented, so I am using AddForce(rb.velocity). Through trial and error I figured out you have to multiply the velocity by the mass and drag of the child rigidbody, but this keeps on slipping ever so slightly over time. If I increase what I multiply by for even 0.01 it starts slipping forwards, so I think I have the formula correct, and I have no idea why it's slipping backwards. Example: big ship with rigidbody2d and a barrel on it also with a rigidbody2d. Barrel has 3 linear drag and 10 mass, so I do AddForce(boatRb.velocity * 30) which means it moves for the most part with the boat but its slips backwards a tiny bit each frame. Anyone know why?
I think this is the right channel
Why can't it be parented?
In other words what's the root of the problem
How do you need them attached
It can't be parented because both the parent and the child have rigidbodies and unity doesn't like that for some reason
So the child doesn't move with the parent
But the workaround was working mostly fine
Until I encountered this issue
Rigidbodies have indpendent physics unless one of them is set as "kinematic"
The correct way would be to use a fixed joint, I believe
In skinning editor, how can I fix things like these?
how do most games go about creating shadows for 2d objects?
I understand i could draw / duplicate every sprite like this but is there a better or more common way?
i'd love it if it worked but it does this
looks completely different to the images in the docs
grass looks seperate and from what i can guess i dont think that ground is done using tiles
probably instead is predrawn
Don't know of a "common" way
That kind of shadow techique can be automated with scripts that create shadow sprites, or potentially with the help of shaders
Shadow blending will be a challenge though
Unity's own 2D lighting can only do infinitely tall (or deep, depending on perspective) shadow casters
Assets on the store like Smart Lighting 2D and Modern 2D Shadows purport to do the kind of shadow casting you're looking for, but I have no experience of them
Better vertex positioning would mitigate that, though it may take some trial and error.
For most limbs, you will generally want joints to have a vertex at or near the actual pivot position the bone rotates around, with triangles radiating out from it.
That will minimize a lot of the 'pinching,' especially on less detailed sprites with no(say) visible kneecaps.
how can I set the collisions for the tubes to none without the rule tile?
Change their physics shape in the sprite editor
thanks
hey can i add like offset to tile or maybe does anyone recomend me other way to do bulidings for game?
buildings are usually predrawn, not made with tilesets
I am trying to create a new palette for my tilemap so I can drag my spliced tileset into. I watched two videos on people doing it, and they just created a new tilemap by clicking create a new palette, creating a folder and done. However when I create a new folder or select an existing one, it doesn't nothing and doesn't create a new palette, any ideas on how to fix this?
no, im gonna use rule tiles but i dont really understand it well are you able to help me with it?
if youre insistent on using plain tiles go ahead, theres nothing else to say just place the tiles
but its boarderline impossible not to make it look shit
every game has assets like houses as their own sprites for a reason
i dont want it to be like a stardew valley bulidings
i want it something like this
how to change rule tile to change this sprite to something else
nvm
okay so now its like this do you know how now i can fix these things? sorting layer or something?
Is there a way for sprite renderer to only change color on certain parts of the sprite?
Hi, i am making a simple 2d game and i have a problem regarding particle systems. I set up a custom axis for my transparency sorting mode (x=0,y=1,z=0) in my project setting so that the objects with a lower y would render in front and it works for normal objects. But now i have created a fire particle system and it only seems to work when my objects are way higher than the particle system. I sent some images to illustrate the problem (first picture it works, second it doesn't). Anyone has a solution?
the solution is to put a sorting group on the parent object
Context: I want to make a dungeoncrawler where you go between rooms.
Problem: it works on a tilemap and there are 4 layers. when randomly creating a map i need to instance a bunch of rooms (as prefabs i assume) as child to a grid, but then it will instanciate 4 tilemaps per room. If we say i have 30 rooms, thats 90 tilemaps. thats a lot of tilemaps. is there any way to make this better where it spawns all the rooms walls on the same wall tilemap? that way it would still only be 4 tilemaps. or should i not do prefabs?
I am asuming a large amount of tilemaps affects performance.
unrelated but those trees are banger 💯
Theyre pretty nice, hey
Wish i could draw them like that myself but theyre edited variants from a pack on itch io lol
hi i need help with bone rigging
everytime i try to auto generate geometry to a leg it associates a nearby arm bone
and ignores the bone right on top of the leg
the arm bone doesnt even overlap the leg
at any point
You are ahead of me.... I am trying to get the bones to show. Something is misaligned on mine
Show your geometry? Might be a vertex placement issue. There are lots of times, though, where you just need to manually paint your weights.
ill try to do it manually first
Hi guys, i want to start create game effect like skill fire/ice/water/... for my 2D topdown game. Where I could start and watch i can do to learn the rope fast? (Apologies for my english if they are bad)
Why is my selection appearing rotated when I try to place it? (I'm completely new to this)
After hitting apply to changing my sprite sheet from single to multiple it reverts it back to single, I made sure I'm not in debug mode
I am currently using sorting layers on my characters, sorting groups. Etc.. they layer by pivot points. There is an issue though, when one of the characters is a child (it uses the same, although sized down version as the adult sprite) there is bugs, like the child appearing on top of a fellow adult rather than behind
I know this is because it still sorts by pivot point the exact same and with adult models in mind
I don’t see a way to effectively take into account characters of all life stages though
Is this possible to adjust where the character will sort based on its age? Like a setting via code or otherwise?
Why precisely does the size seem to affect sorting? Scale should only affect how far the pivots are from each other within a character, unless you're also scaling in Z axis which shouldn't be necessary
If you're using the sorting group component for the characters, there should only be one sort point per sorting group
potentially bizzare question. Is there any way for a ruletile to have the ability to interact with itself between z levels of a tilemap?
Like I am trying to see if there is anything unity has that lets me create conditions for things like this
You'd have to show the seams and the UV map
Do it in #🔀┃art-asset-workflow as this is the channel for 2D
oh thank you I apologize
darn seems like no one is sure. Which is unfortunate since google is not getting me anything either
here's an issue, like this wouldn't happen if it weren't for the size of one of the foxes
but it needs to be that size bc its a child
i guess maybe as a child i can make its box collider bigger?
I'm having a weird issue. I am trying to use 3d models in a 2d game. Here is a screenshot:
The Red Square is a render texture on a Quad. The Material Shader is set to "Opaque".
This is what happens when I set the Surface Type to Transparent, it moves the texture behind the tile grid.
I can get the quad to render correctly (where the background is transparent with the alpha of the background of the camera that is being rendered to the texture, but I don't know why the quad gets pushed below the tilemap.
I see! When making isometric characters you want the character's combined pivot to be between its feet, both so they sort correctly regardless of their size and so that they scale correctly
You should be able to use a parent object along with the sorting group to fix the combined pivot
Combined pivot?
unfortunately their pivots are like right at their back
it just imported that way
and it seems to function as intended aside from this
You can override the pivot for scaling with a parent object, and afaik that works for the sorting group too
This is the same idea as with isometric trees
If the sorting point is at the base of the tree and the character's feet, they sort correctly regardless of the size and shape of the tree
And when you scale it, you scale it towards the base which also makes sense
You don't want the tree to start hovering when you scale it which happens if it's scaled towards its middle
how can I do that? the pivot point itself never changes unless i manually move it in sprite editor, using a parent object doesnt work
I'm pretty sure using a sorting group component makes all child sprites use the component's transform as the pivot
It does, but the issue is more so getting the smaller foxes to sort behind other foxes differently than if they were adults
But now that I think about it that would require changing the pivot of the adult, not the child one
What do you mean "differently"
If every character has their combined pivot at the feet (the isometric ground contact point) and they scale relative to it, they all sort properly regardless of size
Yeah mine are not having the pivot point at the feet, and idk how to put it there cause i thought you can only move pivot points in the sprite editor
and am i misunderstanding what isometric is?
my game is just a flat 2D game
isometric are 2d but looks like it's 3d
Not fully because simulating change in depth position with sorting by custom axis, that's a technique from isometric graphics
Were a game fully top-down or side-view there'd be no potential for this sorting issue
If you use the sorting group component, the sprites under its hierarchy will lose their pivot sorting relative to other objects outside of the sorting group, because they all use its pivot from then on out
I don't fully recall how it works but I assume the sorting group pivot is simply that GO's transform
is there anyway this could work with the object being a child
because making it a parent breaks A LOT of stuff
it's gonna require a lot of recoding
How so?
everything is based around the body
itself
all the pathfinding, collision, the animator
The sprite or the object? I'm not sure it's even possible to intrinsically connect the sprite renderer to those other systems
object
Then I'd assume all you need to do is to separate all the sprite parts into a child hierarchy
I'd duplicate the character and strip all non-sprite stuff from the duplicate, then strip all the sprite stuff from the original and parent
If you're using getcomponent a lot, you'll have to swap those to a different kind of reference, like ones with [SerializeField]
But compared to the hoops you've been jumping through I don't think that's a huge problem
A difficult part could be if you've been using the animator to also drive properties unrelated to the sprites, in which case you may need to refactor a bit more
In the future you should always separate visuals from the gameplay components hierarchically so when you need to swap one or the other it won't get messy
Why my camera dissapear im using 2d
hey i need help with tile maps i dont really understand them and i need help how i can flip these tiles using rule tiles? tiles on right are good but on left they should be fliped but i dont have any idea how to do that i hope someone can help me
What do you mean by "disappear"... it's there. If you mean that you cannot see the camera outline, then just zoom in/out or press F to focus on the camera...
Also, make screenshots instead of taking pictures with your phone.
If you click on the circle you can declare that the check should be flipped or rotated (depending on the indicator).
Opaque quads are sorted based on depth, but transparent ones aren't.
No its not gonna work
Hi, i need help on how i could flip this group of sprite, like the ones in sprite renderer
Hi everyone. My problem is that sprite's position is changing when it switches to a different animation.
As you can see in the video, sprite's position changes on each animation
A common symptom of inconsistent sprite pivots, always happens if you slice the sprite with automatic slicing
Prefer mp4 or webm video formats as they can be watched without downloading
i fixed it by slicing by grid count and setting the pivot of all the animation sprites on the same x, y values on sprite editor. OBS records videos on mkv format by default, i forgot to change that. Thx for the reply
may someone explain how I may sort my trees? I've figured out how to sort most of my props, but the method I use there doesn't work for my tree tilemaps (URP Y sorting). sorting my trees individually absolutely does not work and I can't find anything online about common practice of how to do this. my trees are split up into 3 different tilemaps: trunks, trees, and leaves. I've found it is the best solution to leave trunks on individual Y sorting and trees and leaves on chunk. But then of course it produces this weird sorting issue, which granted takes a bit of manuvering to produce but would totally be noticable in average gameplay
how can i prevent this or is there no way and i just have to make the collision wider so this doesn't happen?
Hi peps. I heard of sprite shape renderer but is there something similar that can also give you the ability to give each side a specific texture?
Sprite shape profiles can give multiple different edges but it's limited to just specific angles.
By far the best way to sort is to have all the pivots at the base of the tree, like I was talking about earlier
But with tilemaps that's a bit more complicated
Do they necessarily have to be tilemaps?
Not really I just looked it up and apparently most people say to do trees with Tilemaps
I've never heard that one
It makes sense if you specifically want them to be made from tiles, so you could have trees made from fully modular square pieces
I mean there’s not much I can do with that.
Though wouldn’t it get extensive in some way if each tree on the map was a separate object
I mean there’s probably going to be like 200 trees on the map
Probably not terribly, but it's hard to say
If a tilemap turns out to be more optimized, you can also have a tile that's just by itself the whole tree
In Unity tiles don't have to be restricted to be within the tile square
how can I do that? In the sprite editor the grids on 32x32 and there are other objects on there such as the leaves and bushes
I guess I just have to do it separately from those or something?
Do leaves need to be separate? Sometimes they need to if you want to hide them contextually or something
But you could also do that to the whole tree if it's necessary
Yes they need to be separate to hide them contextually like if I go behind the tree
Hey I'm running in this problem..
The redish blocks are Z Pos 0 and the blue ones are 2
But when placing them it gets messed up...
You could try setting the Player object's transform x scale to a negative. The child objects should flip as well
I have problem with my 2D Layers, i want to drag a character asset on my scene wich already have a background but my image goes is like "ate" by the background when i add it on side it's here but once i move it on my background it disapear