- Home /
Sprites and Platforming?
Hello all. I'm using Spritemanager2 in my game, I'm attempting to build a basic platformer using sprite characters.
Sadly, there isn't a lot of documentation surrounding sprites as far as Unity is concerned. How to move them, how to set up collisions, etc. Could anyone point me to a resource on how to work with sprites inside Unity? Or perhaps a basic platforming tutorial? Or at the very least some tips on how to get started?
Answer by HolBol · Nov 11, 2010 at 07:39 AM
Use a flat plane with a texture on the side, and turn it to face the camera (which should be orthographic). Give the plane a parent box collider object/ character controller for collisons. Just think of 3d, but with billboards rather than meshes.
I'm using S$$anonymous$$2 so I don't have a problem actually making the sprites. But that is helpful to hear someone say to just think of it as 3D. I've attached a rigidbody component onto my sprite and so far it seems to work great.
What would be the best way to actually move a sprite though? Adding force? transform.translate?
i'd use the platform controller that comes with unity 3, it's VERY handy for all your physics stuff, and supports fixedUpdate. It's included int eh standard assets.
I'll be sure to play around with it then. Thanks so much for the help :)
WARNING. If you use the platform controller, delete the rigidbody on the character or else your character will randomly fly up to infinity. $$anonymous$$ade this mistake and spent way too much time debugging something so simple and silly to solve. So just keep it in $$anonymous$$d
Your answer
Follow this Question
Related Questions
Moving platform player bounce when moving down 1 Answer
I have a problem with my enemy AI script 1 Answer
Character clips into the ground in 2D platformer 0 Answers
2D Platformer - Problem with object that kills, then restarts after build 1 Answer
2D Platform Player moving instantly from upper platform to lower, only when moving left 0 Answers