Skip to content

ThirteeNov

My personal blog about coding and internet

Menu
  • About me
  • About Zofia Kreasi
  • Cart
  • Checkout
  • Making an airplane game from scratch in Unity
  • My account
  • Privacy Policy
  • Privacy Policy – zkLeaderboard
  • Sample Page
  • Shop
  • Tutorials on Learning JavaScript
  • ZKAccounts – Privacy Policy
Menu

Wondering why you can not modify position of your player with Character Controller enabled in Unity?

Posted on September 6, 2021September 6, 2021 by Habibie

I have a capsule object with Character Controller component enabled in it. Somehow if I want to change it’s transform.position, I can not just do it like as if it doesn’t have Character Controller.

So workaround is, to temporarily disable the CC for a while and change its position then re-enable it again like this:

CharacterController cc = GetComponent<CharacterController>();			 
			cc.enabled = false;
			transform.position = somevector3value;
			cc.enabled = true;

Hope you can find it useful guys!

Post Views: 162
ciihuy2020

Welcome!

  • My YouTube Channel
  • My GitHub Page
  • About me

Categories

  • 3DVista
  • Android
  • Apache
  • C#
  • Cordova
  • Electron & Node JS
  • HTML5, CSS & JavaScript
  • iOS
  • Let's Make Unity Games
  • Misc
  • Photoshop
  • PHP
  • Python
  • Uncategorized
  • Unity
  • WordPress

Recent Posts

  • Make objects like wires and cables easily in Unity using Ciihuy Curved Mesh
  • [SOLVED] Can’t Add Custom Domain to Blogger After Losing CNAME Verification
  • iOS App Icon Generator by CiihuyCom
  • Advanced Blinking Marker Script to show objects position in your game canvas
  • Ciihuy Images Merger – Fast & Easy Online Image Combiner
© 2025 ThirteeNov | Powered by Superbs Personal Blog theme