- Home /
Child object consistency issue
Hello,
I have an issue with a child. I have a spritesheet with the player and several accessories, and I attached them to the player as a child. This is a 2D game. When I move left, I make the local scale of the attachments (-1, 1, 1) and when going right they are scaled at Vector3.one.
When I am moving left, I can sometimes see a split in between the objects, and this is my issue.
I even tried
child.transform.position = transform.position;
Still no luck :/
$$anonymous$$ake empty gameobject and put all content of character to childs of this gameobject. And scale x of this parent. Scale not childs but parent of all this.
Answer by fuego_see_money · Jun 30, 2015 at 09:44 PM
I had a problem very similar to this, but with environment tiles from sprite-sheets in my 2D game. I did a lot of research and it turns out (as seen here and here and even more places) that if you align your spritesheets perfectly, they will sometimes get gaps between them (like in the second hyperlink).
There are a few things you can try:
1) On your import settings for your spritesheet of your player, use Point filter mode. (This didnt work for me but it worked for some people)
2) You can also try setting texture mode to "Advanced" and then fiddling with the Filter, Mipmap, and Wrap modes to see if you can get something to work. Some people also say changing the Format to RGB 24-bit mode has solved their problem as well. (see TextureImporter documentation for more)
3) This is what I did - Scale your individual parts of your character to be a little bit overlapping, so that when those gaps appear, you wont actually see it. This is more of a bandaid fix, which is why i hope #1 or #2 will work for you, but you might have to do it.
Cheers (and good luck), -Will
@fuego_see_money The childing it all to an empty seemed to work well, until i found out i was mistaken. It is still happening. please help :(
Upping the fixed timestep helps, but I dont want to up it above 100fps so Idk
Yeah 100fps is quite a lot - I would recommend overlapping your sprites by a good 5 pixels or so on every side.
Your answer
Follow this Question
Related Questions
Keyboard inputs randomly drop in Unity 5.4 2 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Player Launched Into Air Problem 2 Answers
Controller like CubeWorld 0 Answers
Issue where if I click a button then press W,A,S,D the value of my sliders go down by 10 or up by 10 0 Answers