x


Character controller partially passing through rigidbody in a head on collision

This is a follow up question to something I asked yesterday and I thought I should put it in it's own question.

I have a character controller and a platform, which is a kinematic rigidbody.

The rigidbody just oscillates between 2 points, and moves with:

rigidbody.MovePosition(rigidbody.position + _direction*Speed*Time.deltaTime);

The problem is, when my controller jumps and the platform is moving towards the controller, the controller partially passes through the platform and I can't seem to prevent this other than cranking up the skin width which makes me hover above the ground.

The controller is using a modified version of the standard fpswalker script (to allow things like wall jumping etc) but I do not believe any modifications would have changed the behavior in these circumstances.

A video of the problem can be found here: http://bovinelabs.com/crush/crush/

Suggestions?

more ▼

asked Feb 21 '11 at 10:17 PM

tertle gravatar image

tertle
1.1k 15 18 33

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

2 answers: sort voted first

Managed to work around well enough that it works near flawlessly.

Greatly reduced the Time.fixedDeltaTime and added a larger buffer zone to my crushing objects.

more ▼

answered Feb 22 '11 at 08:19 AM

tertle gravatar image

tertle
1.1k 15 18 33

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

You can also add more than 1 mesh to collide. Sometimes doubling or tripling up the mesh's can ensure they always collide, even at high speeds.

I hope this helps.

Shawn

more ▼

answered Mar 14 '11 at 03:11 AM

shawnkilian gravatar image

shawnkilian
361 21 28 41

That's possibly a clever idea.

Mar 15 '11 at 12:59 AM tertle
(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:

x2485
x1865
x1783
x670

asked: Feb 21 '11 at 10:17 PM

Seen: 1961 times

Last Updated: Feb 22 '11 at 07:32 AM