Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
1
Question by Proclyon · Dec 09, 2010 at 12:17 PM · valueinterpret

Controller.bounds.(min/max) is giving me a value I have trouble with interpreting

Hey again everyone :)

I have a very small question about the test results I received while attempting to do a movement with my character controller.

There is an event that occurs (doesn't really matter for the question) and then a method is called which does a capsule cast (you don't need to understand it for this question either). One of the values I am using is controller.bounds.min.y and controller.bounds.max.y .

Here are the results on a breakpoint:

...min.y = 0.20

...max.y = 1.69

and the extents of the bounds say the center is at 0.7.

So 0.7 - 0.20 = 0.50 --> deltaCenter = .5

and 1.69 - 0.7 = 0.99 --> delteCenter = .99

So the center isn't the center even on the first frame this hits? That's strange, since I only change the controller size on an unrelated event that does not occur here (which would make sense so I checked before asking everyone for their time here).

So penny for your thoughts really. Doesn't seem to change a couple of frames later, think the bounds is just broken? Or am I missing something obvious again?

EDIT 13:13 GMT+1 12/09/2010:

I can verify that the values of the bounds min and max are accurate. When I put some test objects in my scene at all the aforementioned values I can see compared to the character controller that both min and max are the center values of the spheres of the character controller capsule and that the center of the cylinder is actually a little bit offset along the negative y axis (at 0 rotation on X axis). Meaning that the cube on 0.7 shows a little lower than the center of the cylinder. Can someone confirm that bounds is broken or is this a code fluke I am overlooking?

Comment
Add comment · Show 4
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 Statement · Dec 10, 2010 at 03:38 PM 1
Share

I must admit I am too fussy in my head to understand your situation entirely but I just want to add in that I had problems with bounds (renderer bounds) that were slightly off, never really aligned with the object they were trying to contain. It was almost as if they had different coordinate systems. I don't know, I gave up my bounds code and made a manual approach ins$$anonymous$$d :( Not sure if this helps or breaks you but I wasn't able to figure out the bounds, in that case.

avatar image Proclyon · Dec 10, 2010 at 04:52 PM 1
Share

No this helps a lot actually, I am looking for people that had similar problems and that can describe them. If it's a glitch I think the tech $$anonymous$$m should be informed and a wish list item posted to fix it since having inaccurate position data with the low feedback I'm already getting as programmer compared to my usual environment(s) I feel it's problematic enough to do so. But that's just me and my experience is limited. So I figured I'd double check the problem and find some more opinions on the matter. So in short, thank you :)

avatar image Statement · Dec 10, 2010 at 05:16 PM 0
Share

I was driven insane trying to figure out why I couldn't get my bounds to fit the object I was trying to contain. I feel so much better knowing someone else have the same or a similar problem. I am dying to see if there is any problem with bounds or if I am just a thick programmer who can't grasp anything as mysterious as a box :)

avatar image Proclyon · Dec 10, 2010 at 05:47 PM 0
Share

Yeah know that feeling all to well, You don't want to blame the bounds property and risk losing face but you don't want to admit your code is wrong after checking 500 times either, it's a lose-lose!

0 Replies

· Add your reply
  • Sort: 

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

No one has followed this question yet.

Related Questions

Inverse the mouse position value 2 Answers

Random value from -1 to 1 2 Answers

change playerpref number by one 1 Answer

using enum value in cs? 1 Answer

Findinga GameObject Transform 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