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 /
  • Help Room /
avatar image
0
Question by faizabdo · Dec 05, 2016 at 11:57 PM · not workingtutorialcuberoll a ball

roll the ball collecting cubes not working help

I am currently following the tutorial on the "roll the ball" game, I'm on the last step however the ball isn't collecting the cubes. is my code wrong? please helpalt textalt text

capture.png (44.1 kB)
capture1.png (14.3 kB)
Comment
Add comment
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

4 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by faizabdo · Dec 20, 2016 at 07:29 PM

The game is working properly now! you both were right i didn't tag the game as i was suppose to causing the game to malfunction. Thank you both for the help, it is much appreciated @Thomas-Hawk @michelle12188

Comment
Add comment · Show 3 · 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
avatar image Thomas-Hawk · Dec 20, 2016 at 08:56 PM 1
Share

On the cube object, look for the collider component, it will be Box Collider probably, makes sure the checkbox next to "Is Trigger" is CHEC$$anonymous$$ED.

This is saying, that ins$$anonymous$$d of the collider defining the physical collisions, it is letting things pass through it and sending that information (as a Collider variable called "other") to the OnTriggerEnter script, that asks "If it's tagged as "Pick Up", set that object to be disabled, add 1 to your current count, and then update your text on the GUI by passing it through its own function which checks whether or not you've collected 12, and thus posts / enables the win text.

avatar image faizabdo Thomas-Hawk · Dec 21, 2016 at 04:10 AM 0
Share

I didn't check the "is trigger" box for any of the cubes before, so as you stated I thought that might be the issue however now when ever the player comes in contact or touches the cube it pauses the game and now a error pops up saying "Pick Up is not defined" how do i fix that? @$$anonymous$$-Hawk

avatar image michelle12188 faizabdo · Dec 21, 2016 at 05:34 AM 1
Share

Pick Up was the name of your tag. I would guess this means you haven't actually created the tag. You need to go to the tag manager and create one and then assign it to the object you are trying to pick up.

Check this out for how to create the tag:

https://docs.unity3d.com/$$anonymous$$anual/class-Tag$$anonymous$$anager.html

avatar image
1

Answer by michelle12188 · Dec 06, 2016 at 06:46 AM

Double check that you have the colliders and rigid bodies set up properly and that the tag on the pick up object is exactly the same as you wrote in your code.

Other than that unless you are getting any errors I would add some debugs to check what point the code is getting to.

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
avatar image
1

Answer by Thomas-Hawk · Dec 21, 2016 at 05:33 AM

Make sure your cubes are tagged as "Pick Up", the case and space being important there.

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
avatar image
0

Answer by faizabdo · Dec 06, 2016 at 09:26 PM

I checked for it multiple times and i even when back to the video to see his code however mine isn't still working its hitting into the cubes instead of picking them up. @michelle12188

Comment
Add comment · Show 1 · 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
avatar image michelle12188 · Dec 06, 2016 at 10:14 PM 1
Share

If it is bumping into the object it sounds like you forgot to check the isTrigger option on the collider for the pickup item

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

85 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

Related Questions

roll the ball - player not moving. Script seems fine,Roll a ball not rolling, should I add speed ? 1 Answer

UnityEngine.GameObject' does not contain a definition for position 1 Answer

rollaball floating ball 1 Answer

Blend generated fbx import to unity problem 1 Answer

Roll a ball tutorial error-2 Moving the Player 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