I’ve got a 3/4 view perspective camera which can rotate around in 45 degree increments, and my characters/items are billboarded sprites with 8 possible facing directions. Something like Final Fantasy Tactics, Persona 2 etc. Problem is, the billboarding is causing part of the object to be inside the surface it sits on, and it slides around until it hits a wall. How should I approach this? Is there a way I can say, billboard the sprite but have a collision mask that’s untouched?
Couple things of note… One, the problem behaved differently on two different video cards in Unity 4, and B, the sliding is a lot faster since upgrading to Unity 5.
If you’re going to do something like a billboard as a graphical effect for your object, you’re going to want to segregate the object’s physical representation and graphical representation. You could have another object (that doesn’t have a Renderer) represent the object physically, and have the graphical representation (with the billboard script) be a child of that object.
If the object is behaving differently depending on the video card, or changing in Unity 5, it could be dependent on the framerate. This often occurs if you’re moving something around in Update() without using ‘Time.deltaTime’. This is usually the first thing you should assume if things go haywire when you uncap the framerate/turn off v-sync.
I can imagine, with the billboard script affecting the collision resolution, the script would change the rotation of the object and put it within the ground, then collision would resolve and it would be moved. At a higher framerate, if the billboard script isn’t placed in FixedUpdate(), this could occur more frequently.