Before updating to Windows 10 you may need to return your Pro license. More information here

colliding characters and meshes

I have a game object with a character controller and a large mesh that moves around the screen. I want them to collide.

Currently, a collision occurs when the character bumps into the mesh. When the mesh bumps into the character, a collision does not occur -- the mesh just passes through the character.

I'm aware that this asymmetry exists because of how character controllers are implemented. I've seen a few solutions for these types of issues posted, but all of them involve simple platforms, not arbitrary meshses. If I need my character to be knocked around by an object with a mesh collider, do I have any good alternatives other than making my character a rigidbody and recoding a lot of its controls?

Note: the large mesh in question will always be a child of another character controller, if that helps.

more ▼

asked May 26, 2012 at 04:14 PM

avatar image

135 22 19 23

Have you thought about adding similar code to the mesh?

May 26, 2012 at 04:18 PM You!

You mean add a character controller to the mesh? That would be nice, except for the fact that character controllers seem to come with capsule colliders built in (and I need the meshes to retain their mesh colliders).

May 27, 2012 at 06:17 PM armoredpokey

Note: for others out there who encounter similar problems, I've managed to make things work decently well by swapping out my character controller for something I adapted from the following script: http://www.unifycommunity.com/wiki/index.php?title=RigidbodyFPSWalker

It would be nice if there was an easy way to enable character controllers to collide with a certain subset of game objects, though, 'cause rigidbody physics is a lot rougher.

May 27, 2012 at 06:21 PM armoredpokey

I mean to add similar collision code to the mesh. Since the mesh has a collider, you can call its collision event when something collides with it, and have the same events happen in that collision event.

May 27, 2012 at 10:22 PM You!
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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



Answers and Comments



asked: May 26, 2012 at 04:14 PM

Seen: 1315 times

Last Updated: May 27, 2012 at 10:22 PM