x


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?

more ▼

asked Nov 11 '10 at 05:44 AM

Jack gravatar image

Jack
10 7 8 9

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Nov 11 '10 at 07:39 AM

Fishman92 gravatar image

Fishman92
2.4k 101 113 128

I'm using SM2 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?

Nov 11 '10 at 08:03 AM Jack

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.

Nov 11 '10 at 08:07 AM Fishman92

I'll be sure to play around with it then. Thanks so much for the help :)

Nov 11 '10 at 09:14 AM Jack

WARNING. If you use the platform controller, delete the rigidbody on the character or else your character will randomly fly up to infinity. Made this mistake and spent way too much time debugging something so simple and silly to solve. So just keep it in mind

Jun 03 '11 at 07:33 PM youmu42
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1072
x192
x79
x51

asked: Nov 11 '10 at 05:44 AM

Seen: 3759 times

Last Updated: Jun 03 '11 at 07:33 PM