- Home /
Does First Person Controller have infinite mass?
Hi
I have a grounded game object (craft) that has a Vector3.up force added to the rigid body. All works fine, it lifts off vertically as expected, except when I put my FirstPersonController on top of it, then it refuses to budge. At game start, I've tried putting my FPC a little above it, and I can see that it lifts off OK until as soon as it makes contact with the FPC.
I've tried giving the craft a larger mass of 10 and force of 200 to minimise the effect of any extra mass on top of it, but even with ridiculous forces, it still won't budge.
I can put any other rigid body on top with no problem, and adjusting the various masses results in the expected physics behaviour, so I'm sure the problem is solely with the FPC.
Is there a workaround for this?
Thanks
Steve
Answer by spinaljack · May 20, 2010 at 12:34 PM
Character controller isn't affected by physics, nor will it cause physics reactions in other objects i.e. a character controller wont roll a ball if you pushed it. You need to apply force to the object you collide with using scripts if you wanted that to happen.
So if you wanted the character to move up with your object you need to test for a collision with the character and then edit the character's transform to move with the object.
You could also write your own physics based character controller if you wanted.
Thanks, though just to clarify: "nor will it cause physics reactions in other objects" It's visibly causing a stopping reaction to the object that's moving up in to contact with it.
As the controller can still walk about on top of the object, I'll try adding the craft transform to the controller transform in line with what you suggested.
That behavior is expected. The character controller will not pass through objects if you use CharacterController.$$anonymous$$ove, and if an object is being moved by its rigidbody, then it will not pass through the character controller either.
Your answer
Follow this Question
Related Questions
First Person Controller gravity changing script. 2 Answers
Speedometer for a First Person Controller 1 Answer
First Person Controller Collider 1 Answer
No standard assets 1 Answer