So I'm fairly new to Unity. But in a short while I've been able to learn to isolate the various scripts concerning FPS elements. I'm very concerned with trying to write everything from scratch/tutorial help because I need to know -how- everything works. If I can understand it, I can modify it. Enter: my problem.
The Character Controller is basically for all intents and purposes off limits to me. In the inspector it shows it as an element (assumedly a script but it doesn't list one) but as to how it functions, how to play with it, heck even its code is a mystery. I've tried looking all over for it, can't turn it up. Supposedly its in the original assets but i've been unable to find it. Only place I can be sure to see it is attached to the provided prefabs, both First and Third Person Controller (inside the Standard Assets\Character Controllers folder).
So my question isn't really a question, but a few of them.
Did I accidentally delete it somehow and its surviving as a ghost attached to a prefab?
Is it some kind of voodoo or proprietorial secret I'm not allowed access to?
Assuming no to the first 2, is there a tutorial I can be linked to that will explain how to write one?
If it is a secret, and there is no tutorial, would going to the trouble to write my own and upload it land me in a heap of trouble?
Thanks in advance for your time, and reply! -sgmongo
It's internal workings are technically what you would call 'voodoo or proprietorial secret', however that doesn't stop you from using it! In an ideal world everything would be open source, I know, but Unity isn't like that. However, its API reference is extremely well documented, and provides you with everything you need to create your own content- there is no reason to even want to modify the inbuilt components! If you write your own, you would be wasting your own time for no good reason, and nobody would care if you uploaded it because the inbuilt version is better supported anyway.
Answer by syclamoth
Oct 09, 2011 at 10:41 PM
How about 'None of the above', and 'Check your Documentation'. There is lots and lots of information about all the inbuilt components- just drop down the 'help' menu, and have a browse through the lovingly detailed API reference, as well as the manual which includes basic tutorials on pretty much everything Unity has to offer.
Answer by sgmongo
Oct 10, 2011 at 12:48 AM
Well, the link you provided wasn't very helpful, just the silly variable explination. I've rechecked the help material, and turned up nothing. (Not infallible here, just can't find it)
Maybe you need an example of the kind of thing i'm looking for.
The "Slope Limit" variable governs the angle at which you can continue to move while encountering a collision.
Where is the scripting/programming that accomplishes this?
Also: you ignored the questions about a tutorial (I'll assume there isn't one) and about whether or not i would get into trouble for publishing one on your asset store. The latter still deserves an answer if you can.
Thanks again, -sgmongo
You can't get into the guts of the inbuilt components! They exist to help you write your own behaviours, and act as interfaces between your own code and Unity's gameworld. If you went to the trouble of writing your own version of the CharacterController, I can't imagine you getting in trouble for it, but at the same time I can't understand why you would want or need such a thing! The whole point of a library is that it provides functionality with a consistant frontend- you shouldn't need to get into the guts of it to be able to use it.
Also, there are so many tutorials about the Character Controller out there. Just do a quick google search and see what turns up! Literally like 90% of all newbie tutorials teach you how to use it. Personally, I don't like to use Character Controllers for my player movements, because they are non-phyisical, and pretty slow- but that's just personal preference.
I really don't understand what it is you are trying to do here. The inbuilt components are your tools! You don't need to hack them to make them do what you want.
Last of all, don't post comments as answers. It's a terrible faux pas.
I just wanted to see how it works... so i could at least understand it's function. Maybe write my own with new built in functionality.
As for the Answer bit, sry first time accessing this forum.
Well I feel shouted at :( I guess I'll stick to google for my answers. Sry to waste your time. I'm sorry if my comment (Actually an answer apologies again) came off as being annoyed but it wasn't the case, just trying to get a specific answer.
No, you can't see how it works. The real question is, why do you need to? Everything you need to know about it is very clearly stated in the documentation.
As I said, you can write your own- I would even recommend it, given how inefficient the actual CharacterController is. However, you would still have to use some inbuilt components, like meshfilters and Capsule colliders to be able to make it work without excessive trouble- and even then, you would still be using the inbuilt classes for everything, which are just as closed-source as the components. If you want to write a game from the base up, why bother with Unity at all? Unity provides these tools to help you!
The reason I wanted to know: I have a inquisitive mind ^.^ On second look you seem just animated, not shouty. I'll send up my next question and see how it goes. Completely unrelated though. Maybe see you on another problem. Have fun syclamoth.
I don't understand the antagonism, it's a great question! In any game system it's valuable to have source access for low-level optimizations and customization. And in Unity you can, you just need a special source license. Here's an article on licensing (that I tend to disagree with): Why You Probably Don’t Need a Source Code License
Please keep answers helpful, it's unprofessional to berate an honest question with condescending (contradictory) scolding.
Answer by Marcurios
Dec 25, 2012 at 05:17 PM
Don't want to be a spoilsport here, but i bought a book and it says in the first chapter at a given point "We just need to add the collision check function to the built-in Character Controller script and we will have functionality."
that lead me to googling and i came here for an answer as to why i can't find the Character Controller script. Now i have my answer cause it's under the hood in Unitý, but now i'm frustrated cause i want to learn scripting and now i get stuck in this book also..
been searching for 50 hours on some good starting info..getting mighty frustrated here..
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
5 People are following this question.
Character Controller Jittering Problem
Anyone have a 'click to move here' character controller script?
Object reference not set to instance of an object
Very Simple Left and Right Movement Script [OR] disable dravity on CharacterController?
Ball Character controlled by a single Joystick?