x


Sprites always facing camera problem - sprite manager 2 possibility.

Hi,

I'm making a first person shooter game.

I want to save on juice and use sprites to simulate tiny plasma balls meaninglessly flying around. I've done it before in Blitz 3D engine but I know very little about scripting. I have the tiff and can paste it on a plane. I can move around it and it looks great. However, I cannot make it face the camera. I've looked at Sprite Manager 2 but the video doesn't indicate whether you can make the 'animated cow' sample always face the camera. Need to know for certain before I buy it.

Thanks

more ▼

asked Jun 16 '10 at 04:53 PM

Carlos Kellar gravatar image

Carlos Kellar
31 6 6 7

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

3 answers: sort newest

I have the same problem, trying to make a plane face the camera. The Script from the Unify Community, referenced above, lets my plane's edge face the camera. Of course, this is not the effect I hoped for, since it is more or less invisible that way.

Edit: Problem solved.

I simply created the plane in Maya and rotated the vertices, so that the plane actually had a different coordinate system than the one you create as a standard in Unity with GameObject --> Create Other --> Plane.

Was I the only one with that problem? Is there an even easier (and maybe more elegant) way to do this in Unity?

more ▼

answered Jan 27 '11 at 02:22 PM

Leviathan gravatar image

Leviathan
50 2 2 10

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

This can be done in SM2 by simply attaching the sprite to the camera. It's built in.

more ▼

answered Jul 25 '10 at 04:45 PM

Thom Denick gravatar image

Thom Denick
1.9k 13 20 38

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

I don't know about SM2 (as I don't have a copy of it), but the math for doing a billboarded sprite is pretty simple. The original sprite manager (found here) has been updated to support it. If SM2 doesn't have it out of the box I'm sure it wouldn't be too hard to add it.

more ▼

answered Jun 16 '10 at 07:19 PM

Tetrad gravatar image

Tetrad
7.2k 27 37 89

Add the smoothLookat script to the sprite and make the maincamera the object to look at.

Jun 17 '10 at 01:10 PM Gordon 2

Don't use smoothLookat, it'll distort your sprites at the corner of the screen. Use the link from the answer above. Thanks for that btw :)

Jul 08 '10 at 03:01 AM MaDDoX
(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:

x3014
x215
x148
x60

asked: Jun 16 '10 at 04:53 PM

Seen: 2853 times

Last Updated: Jun 16 '10 at 04:53 PM