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 mrsev · Nov 14, 2016 at 12:48 PM · scripting problemcollidertriggercomponent

Can't change bool while accessing other script

Hi, I've tried several different ways for this... Really need help.

When the Thrombocytes (grey stuff) are in the trigger collider "VesselCollider", it should set bool "vessel" to true in the other script named "Follow" in the "Thrombocyte" GameObject. See pics.

Thing is it doesn't. When I change the bool manually to true, it works, so the rest of the scripts is fine. Just trouble triggering or accessing the boolean... alt text alt text

vessel2.jpg (307.7 kB)
vessel.jpg (128.3 kB)
Comment
Add comment · Show 2
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 JScotty · Nov 14, 2016 at 01:05 PM 0
Share

You can try to debug the other.gameObject and check if it is the vesselCol object?

avatar image mrsev JScotty · Nov 14, 2016 at 02:08 PM 0
Share

I put a debug.log to the collision, nothing happens, the trigger sphere (parented to the Thrombocytes), doesn't seem to detect the trigger sphere vesselCol.

2 Replies

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

Answer by ElijahShadbolt · Nov 15, 2016 at 06:07 AM

I think two trigger colliders do not detect each other. You might have to make one of the triggers (maybe the Thrombocytes one) a collider with an attached rigidbody (maybe set to kinematic) to be able to detect it entering the other trigger.

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 mrsev · Nov 15, 2016 at 07:50 AM 0
Share

That will definitely work, thank you.

Didn't know two Triggers don't detect, that could be inconvenient if I wanted larger colliders just for that event, because as not triggers they would collide (obviously) with others objects.

But it's not the case. I'll test it later!!!

avatar image ElijahShadbolt · Nov 15, 2016 at 09:03 AM 0
Share

If you want a collider to not collide with other objects, you could create a new layer, and in Edit > Project Settings > Physics, untick all the tickboxes for that layer in the Layer Collision $$anonymous$$atrix.

avatar image mrsev · Nov 15, 2016 at 09:21 AM 1
Share

Someone give that man a cookie

avatar image
0

Answer by lucashall · Aug 10, 2017 at 09:10 AM

Thank you Sublime! It works!

192.168.0.1

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

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

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

Related Questions

Trigger enabling component works in one statement but not another? 1 Answer

Collider/Trigger script without Rigidbody2D component attached not working 0 Answers

How would I change material properties of a box collider via script? 0 Answers

Triggers colliding with triggers 1 Answer

ui Text not responding to collider 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