“Paw R (UnityEngine.Transform)
UnityEngine.Debug:Log(Object)
AnimatorPlayer:LateUpdate() (at Assets/Assets/Player/AnimatorPlayer.cs:202)”
In the console… Can anyone tell me why I do not “Get” the “Bone Transform” ? (I know ways around it, but clearly I am very very ignorant of how GetBoneTransform works and could use a bit of explanation. Hybrid Generic/Human rigs are hard enough as it is.)
And please* do not point me to the Unity API It’s one of the no effort generic pages…
“Returns Transform mapped to this human bone id.”
What transforms? I see no x.y.z. in my log.
*EDIT: Added in a “please” so it doesn’t come off as hostile as it seemed after I reread it.
Are you looking for the position of the transform? Transforms contain position, rotation, scale, and parenting information. If you want the position just get the position from the transform:Debug.Log(Anim.GetBoneTransform(HumanBodyBones.RightToes).position);
If that’s not what you’re asking for, I’m sorry I may have misunderstood your question.
I don’t want to be that guy, but the documentation absolutely does explain that. All of the properties of a Transform are documented in this link which is in the quote from your opening post on this thread:
Oh I know what you mean. No offense taken. Actually I applaud your honesty. You are a good person (IMO)!
Like I stated, I was totally ignorant of how that command worked. And assumed that the ) was the end of it and if I tried to add any more I would get compiler errors.
It might make sense after you already know the information, but let me tell you.
Coming in as a total noob, it really isn’t explained well. Trust me, I won’t make this mistake again, and now I understand the system better. But trying to learn it is much harder than it should be. Documentation could add a single line to that page and make it 100% clearer.
(Actually, Any part of unity API should be more than a “single sentence”. Whoever got paid to write that, got paid too much. (Unless he was paid way to little and got lazy about it.) In my opinion of course.
EDIT: No really, Is absolutely stupid. Money exchanging hands… Tutorials being sold… All the other engines are equally as cryptic as unity if not more so… There is a hidden economy here I bet people don’t see. Where information, and how to do things have a “price”. And to ensure this “price”, the important stuff isn’t documented well on purpose…
I don’t want to sound rude, but the Unity docs do assume a basic understanding of the C# language. The GetBoneTransform is a function that returns a Transform object, and the Transform object has a position property.
Maybe it’s not a bad idea to start with some basic C# tutorials first. They can help bring you up to speed on what an object is, how functions work etc.
Well, honestly. As I am learning things about unity, from the perspective of a noob without any context or information besides what I currently know. (What I know I would consider “Novice” at best. But I am trying to learn more.)
I would be happy to add clarification to every unity Api page I deal with that I need to research to understand better. Then, any other people coming in as your “Average Noob” Would be able to learn the system better.
I am not talking about the half arsed BS and outdated answers that plague the forum. (Everyone says addforce for rigid bodies but I can point you to several different posts that direct people otherwise.)
Why is the Api of an open source engine “aiming to “democratize” game development by making it accessible to more developers.” Not handled like a wiki? Where people can clarify and add things… maintain and update, and generally make all of it easier for everyone else. Without needing to pay anyone to write it?
I mean, The Wikimedia Foundation itself is apparently Non-Profit… and still functioning somehow… How the heck does unity not have a For-profit version of this operating purely on donations and supplemented by the licensing fee I am sure many of you are looking at… (Where the users do the work for free, other than policing/wielding the banhammer.)
Edit: To be clear, I would donate 5$ to a system like that. And I think many other people would also be interested in that deal.
That solves your specific problem, but what if someone was trying to get the rotation of their characters right toes, or a script that is attached to the toes?
That function is not designed specifically to get the position of your character’s body parts, it is designed to do a lot more than that.
Yes. But My noob problem was that I had no idea that you could add a .(DOT)“Anything” To that. The page itself left me assuming that I would get the only transform a HumanBodyBone actually gets. And that transform is a rotation, Unless I am mistaken and unity tracks the actual location of bones for some reason. (From what I as a total novice can understand from tutorials. HumanBodyBones, only handle rotation unless you are dealing with either HANDS or FEET.)
All the “.” does is access a field/method/property of an object. This is not a feature specific to Unity or the GetBoneTransform function.
In the edit of my above post, I wrote some code that demonstrates this.
You can add the . to the end of absolutely any function call that returns anything to access various fields/methods/properties.
In this case, GetBoneTransform () returns a Transform (https://docs.unity3d.com/ScriptReference/Transform.html), which is the component that you see in the inspector that stores the XYZ position/rotation/scale components. You can use any of the functionality on that page that you wish with the returned object from GetBoneTransform.
I have tried adding a dot to the end of my stuff many a time and get compiler errors.
Actually as a total idiot using script. This is the rule.
“Unless I am told SPECIFICALLY. I can do it. I will get a compiler error.”
Now I am sure you don’t feel that way. But ask any newcomer.
Edit:Fixed some grammer, Pardon edits, I actually have dyslexia, (Don’t even start on DyslexiaVsScript. I need the scripts and am only one who will.)
You say that as if I was never a newcomer. I did what I was trying to recommend to you earlier - went through basic C# tutorials and learned these things, I was not born with this knowledge.
Yes, I get it, every newcomer start off like that, I was the same.
But you need to learn to overcome that at some point, nobody out there can build something as complex as a video game while still holding this belief. Eventually the tutorials run out and you find yourself wanting to do things that no one has done before.
That is why I recommend that you do some basic C# tutorials/lessons, it is where everybody (including myself) starts. Nobody skips this step and gets anywhere.
Well, I would like to think I am a bit of a special case, as actually, I am a cg artist. I have a pretty rock solid understanding of vectors and rotations, and actualy a bit a LUA practice from the SecondLife days. I know how rays work, and many other things. But the language itself + unity specific things make for a deadly combo really.
It seems impossible to tell what I can, and can not do, with the documentation provided.
With the information I do understand and have though, I have faith that what I am doing will end up being just as average as I am. But it will not be a failure by any means.
Would you be willing to help maintain the Unity API? You yourself seem like a very capable person. And from what you said you seem to understand the way newcomers feel… Surely someone like you would be capable of helping to ease the transition further than the provided single sentence of: “Returns Transform mapped to this human bone id.”