x


Make Character Controller a Box?

I have a question that I cant find an answer to. How do I use the character controller but instead of it being a capsule is there a way to change it to a box? The reason is because I'm making a 2D sorta plat-former game and if the player is on the very edge of a tile then he/she rests on the curved part of the collider at it looks bad. I'v tryed adding a box collider to it but as you can see in this image for some reason the box collider doesn't even have any effect.

So how do I get around this problem?

Thanks!

more ▼

asked Sep 17 '11 at 04:29 PM

MrSplosion gravatar image

MrSplosion
132 45 52 61

I believe the simplest way is to make your own controller. The character controller by default creates a capsule collider. If you want it to create another type of collider, you'll have to find the source script that creates the collider and change it there.

Sep 17 '11 at 06:10 PM asafsitner
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

You can't. Character Controllers are always Capsules. If you don't want a capsule, then you can't use a Character Controller. You can get a similar effect with kinematic rigidbodies and setting its velocity directly.

more ▼

answered Sep 17 '11 at 09:34 PM

Peter G gravatar image

Peter G
15k 16 44 136

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

go to Assets/import package/character controller. after its imported, inside the project panel go to standard assets/character controllers/sources/scripts. all the scripts you need are in that folder. just add the scripts your going to use to the object you want to control and that should work just fine. Only takes a few seconds that way but the scripts are very basic

more ▼

answered Sep 17 '11 at 09:26 PM

ocularcash gravatar image

ocularcash
108 4 7 8

(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:

x2490
x1691
x1043
x1036
x520

asked: Sep 17 '11 at 04:29 PM

Seen: 2814 times

Last Updated: Sep 17 '11 at 09:34 PM