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 /
avatar image
0
Question by xthunderduckx · Apr 30, 2019 at 04:44 PM · rigidbodycharactercontrollermovement script

CharacterController.move called on inactive controller

Firstly, yes, I have seen similar posts, but most of them have no answers or were caused due to issues that are not applicable. For example, no nav mesh is needed for a player controlled character controller, and no updates have been made to my editor.


For some reason, the controller I'm trying to reference on a script is "inactive". This is weird for Unity to tell me because the controller is constantly moving all across the room but still the following code produces the message "called on inactive controller."

The Unity console gives me the message "CharacterController.move called on inactive controller," exactly as quoted even though the controller is enabled and is moving outside of this script. Could the issue be related to any character controller settings, like skin width, or something, or because it is serialized, or etcetera; Is there any explanation as to why this script does not work?

 using UnityEngine;
 
 public class harpoonLauncher : MonoBehaviour
 {
     
     private bool collided = false;
     [SerializeField] private CharacterController playerReference;
     private Rigidbody harpoonHead;
 
     private void Start()
     {
         harpoonHead = GetComponent<Rigidbody>();
         harpoonHead.AddRelativeForce(0f,0f,1000f);
     }
 
     private void OnCollisionEnter(Collision collision)
     {
         harpoonHead.velocity = Vector3.zero;
         harpoonHead.constraints = RigidbodyConstraints.FreezeAll;
         collided = true; 
         //make harpoonHead fly a bit forwards and freeze there. 
     }
 
     private void Update()
     {
         if(collided)
         {
             playerReference.Move(Vector3.MoveTowards(playerReference.transform.position, harpoonHead.transform.position, 1f));
         }//amount moved should increase the further from the center the player is[.  
     }
 }
Comment
Add comment · Show 3
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 kishorea · Jun 02, 2019 at 07:39 AM 0
Share

I'm facing a similar issue :(

avatar image EternalClickbait · Jun 02, 2019 at 08:19 AM 0
Share

Are you sure you have the correct charactercontroller selected? Is the controller disabled by any other scripts or in the editor?

avatar image kishorea · Jun 02, 2019 at 09:53 AM 0
Share

I have multiple player prefabs that are spawned in a multiplayer game. Each player prefab has it's own character controller, which is disabled to start with. I have a Network Behavior script that enables the character controller of a player if they're the local player. Now, I don't see any errors when the host player moves, but when the client player moves, I get the error "CharacterController.move called on inactive controller".

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by metalted · Jun 02, 2019 at 09:19 AM

" I have been plagued with this problem and I accidentally just got a clue why this was happening in my application. Try going to the character controller and changing the "step offset" variable. Mine was .3 and I changed it to something bigger like .35. This uncovered the following error msg...

"Step Offset must be less or equal to + * 2"

Even if I reset it back to it's original value of .3 I still got the error. Once I changed my step value to something that didn't give me an error (in my case .1) my controller started working again. My suspicion is that a U4 step offset value was not compatible with U5 but no warning was generated to that effect after the upgrade. "

(from: https://forum.unity.com/threads/charactercontroller-move-called-on-inactive-controller.488742/)


Found this on a forum. I'm not familiar with the problem myself but this might be something that can help you.

Comment
Add comment · 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

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

159 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 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

Character controller with Rigidbody to apply force 0 Answers

Top Down Mobile Game movement (rb or CC) 1 Answer

Having issues with Rigidbody and CharacterController colision 2 Answers

Make CharacterController act like rigidbody on explosions 1 Answer

Hi please tell me whats wrong with my player script. 1 Answer


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