Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by aristheviking · Jun 30, 2020 at 01:45 PM · unity 2dplatformerspriterenderer

Why does my sprite change size when in game but not when in scene?

So I have this 2D platformer game with a ninja sprite for a player. I play the game for a bit, and everything is fine, until my player dies(jumps down a hole, gets hit by an enemy, etc.) Then, when the player respawns, his sprite is about 6 times larger. Not his hitbox, not his transform, but his sprite. I have no way to fix this and nobody else seems to have this problem. Please help!

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image austingilchristthomas · Jun 30, 2020 at 02:15 PM 0
Share

Please provide the script so that I can help @aristheviking

avatar image aristheviking austingilchristthomas · Jun 30, 2020 at 04:32 PM 0
Share

Here is the Player Script, @austingilchristthomas : https://docs.google.com/document/d/1RvLHUA6qrwBWCJHlSZj6Xbgxz2yY0-gs3TxZRVp$$anonymous$$fAk/edit?usp=sharing

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by FeedMyKids1 · Jun 30, 2020 at 05:10 PM

Try doing the script without parenting your character to any other transforms.

When you parent it and make a change to the localScale, the size change might be different to that made while unparented.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image aristheviking · Jul 01, 2020 at 04:05 PM 0
Share

@Kampinkarl1 Well the five transforms it parents are:

  1. Ground Check(so that he cannot double jump and cannot move unless ground check is on the ground)

  2. Fire Point(the transform that the fireballs will be shot from)

  3. Sword(the player's sword that will appear when he attacks)

  4. Center of the Body(so that the script knows when the player is under a one-block space)

  5. Player Health(Notifies the player of the quantity of his heart containers

so I don't know how I am going to get rid of those

avatar image FeedMyKids1 aristheviking · Jul 01, 2020 at 08:36 PM 0
Share

I don't mean remove the children from your player. I meant don't parent the character to the $$anonymous$$oving Platform. See if that changes anything as far as sprite size.

avatar image aristheviking FeedMyKids1 · Jul 02, 2020 at 01:38 PM 0
Share

It doesn't do anything. I have an explanation with images just below the script on the Google Docs page.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

142 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity2d Walking off platform throws off gravity 0 Answers

HitBox's Box Collider 2D is not following its parent Enemy sprite 0 Answers

While wall jumping, I'm losing the key down (it seems) in 2D. 0 Answers

Random files from my game folder are gone for no reason 0 Answers

Is there a way to create random polygonal sprite in script? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges