x


PlatformerController vs Box Collider

Hi,

I have a stack of box colliders/basic cubes(2x1x2) which the player with PlatformerController stands on top of. Each (one at a time, the one the player is currently ontop of) of the cubes slowly shrinks (using Lerp) to 1x0.5x1(half scale). However after a couple of cubes the player begins sinking into the cube and eventually falls right through the collider.

I've tried messing around with PlatformerController's gravity but nothing seems to work. Is there any way I can stop this happening?

The cubes have static checked if that helps. EDIT: I figured that was easy enough to test, turns out turning static off makes no difference.

EDIT 2: After more tests, I've found that it only happens when the blocks are shrinking on the global Y axis (block gets shorter). It does not happen when shrinking the X and Z axes.

more ▼

asked May 17 '11 at 03:22 AM

Liens gravatar image

Liens
70 11 14 18

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

1 answer: sort voted first

"Static" is for objects that will not move or change. It sounds like you're resizing a static object, but I don't know for sure what kinds of problems this will cause.

Check here for info on what Static is for:

http://unity3d.com/support/documentation/Components/class-GameObject.html

more ▼

answered May 17 '11 at 12:23 PM

almo gravatar image

almo
1.7k 2 6 18

Thanks, it just occured to me testing if static was the problem or not is actually really easy to test (just turn off static and try it), so I did... No change.

May 17 '11 at 12:59 PM Liens

Ok, bummer. Not sure what else to try; hopefully someone else will come by who knows. I'm curious too. :)

May 17 '11 at 01:32 PM almo
(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:

x388
x81
x6

asked: May 17 '11 at 03:22 AM

Seen: 869 times

Last Updated: May 23 '11 at 12:51 AM