- Home /
Floating Crouching Sprite Problem!
Whenever I crouch in my game the sprite floats up because the collision box is in the way. Is there a way I could lower the sprite to make it touching the floor. If you are sending scripts, I am using C#. Could you also give me a simple guide on how to add scripts to your game. Whenever I copy/paste one in, I always get an error :(
Answer by AlwaysSunny · May 07, 2015 at 03:30 AM
Generally crouch animation states shrink and/or reposition the actor's collider. You can have scripted and/or animated control over the collider's size and origin. This is considered the proper way to address this issue.
Adding .cs files to your Assets folder will import them. Any normal method works when adding files to the Assets folder through your OS shell; however, I don't think you can "paste" into the Unity editor Project window the same way you can in the shell.
Any errors are your job to diagnose, especially when it's someone else's code. We certainly can't diagnose such things without seeing the error and script in question.
Further, I wouldn't expect or rely on too much help this early in your coding education, because the vast majority of beginner's information is easily researched.
Cheers,
Your answer
Follow this Question
Related Questions
How do I randomly spawn objects in 2D game? 0 Answers
Gradient mapping in shader graph 1 Answer
Use Sprites as Score 1 Answer
Sprite Atlas split into 2 by Unity, why? 0 Answers