Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by ScottUnityNoob · Feb 10, 2017 at 10:49 PM · colliderplayercharactercontrollerparentontrigger

Why is the FPSController's Character Controller not working as a Collider?

Hello, I was having issues with some scripts I have for "Moving Platforms/ Elevators"

I tried some different things to get this script working. One of them was, I added an additional "Capsule Collider" to the FPSController "on top of" the Character Controller, and this script now works.

public class HoldObjects : MonoBehaviour {

 public GameObject thePlayer;


 void OnTriggerEnter (Collider col)

 {
     col.transform.parent = gameObject.transform;
 }

 void OnTriggerExit (Collider col)

 {
     col.transform.parent = null;
 }

}

But I know, I shouldn't have to add this "additional Capsule Collider", Right? I tried changing (Collider col) to (CharacterController cc) etc. etc. I know this is simple, but i can't get this script to work without the Capsule Collider attached to the FPSController.

Any help would be greatly appreciated! Thanks.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by FortisVenaliter · Feb 10, 2017 at 10:56 PM

The "capsule" in the character controller is for visualization only. It is not an actual collider, as a character does not behave like a normal physics object. If you want those collision functions, you do need an actual collider attached to your object, as far as I know.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ScottUnityNoob · Feb 11, 2017 at 02:25 AM 0
Share

Thank you for your reply. So I'm doing the right thing by adding a Capsule Collider to the FPSController? I'm confused because it seemed to be correct, until it started causing issues with other colliders. For Example: If i have the Capsule Collider on the FPSController, and I enter my "Door Animation Trigger" the animations are messed up. Without the Collider, it's fine, but then the Platforms/Elevators Script doesn't work.

avatar image FortisVenaliter ScottUnityNoob · Feb 11, 2017 at 04:51 PM 0
Share

Well, the CharacterController is handling collisions without expecting the collider. If anything, I'd make the additional collider a trigger as well.

avatar image ScottUnityNoob FortisVenaliter · Feb 11, 2017 at 07:51 PM 0
Share

It's working now, Thank you!

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

113 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

2D Character Falling Through Ground 0 Answers

Character controller going through walls? 1 Answer

Flying character rigidbody - can't see any static collider 1 Answer

How to set an object to be a child of another using c# 1 Answer

PLAYER NOT ACTIVATING TRIGGER WHEN ON TOP OF THE COLLIDER! IS THIS A BUG 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges