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
0
Question by TimBorquez · Aug 20, 2013 at 08:34 PM · collisionraycastcolliderlayersignore collisions

Layer Collision issue

ok i have created a very specific problem for myself and i will try to best describe it with bullet points:

  • have path finding enemies that use raycasting to pathfind

  • have a shield on my character to block enemy bullets

  • set my shield to ignore raycast layer so the enemies dont pathfind around me

-when i fire projectiles from the player they hit the shield

so basically i need to make a way so just the player's bullets are ignored by the player's shield, but i cant use a layer cuz i need the ignore raycast layer

also i cant set my shield collider to a trigger that destroys things as that would ruin the sparks that the enemy bullets spawn

furthermore i have the enemy bullets and player bullets on the same layer so they dont collide so setting the shield to the bullet layer and ignoring raycasting would not work either...

im not sure if this problem i have made is solvable with all of these silly restrictions i created but thanks to anyone who tries to help

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

1 Reply

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

Answer by Ejlersen · Aug 20, 2013 at 08:42 PM

You could set player bullets to a seperate layer, then in Edit -> Project Settings -> Physics, you can disable physics between player bullets and shield.

Comment
Add comment · Show 5 · 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 TimBorquez · Aug 20, 2013 at 11:14 PM 0
Share

could i do it without having to change the shield's layer though cuz i definitely need ignore raycasting on it

avatar image Ejlersen · Aug 21, 2013 at 07:16 AM 0
Share

Sure, just add a new layer called PlayerBullets, then in physics you turn off physics between Ignore Raycast and PlayerBullets.

avatar image TimBorquez · Aug 21, 2013 at 07:45 AM 0
Share

ok so i guess i could make an enemy bullet layer and aplayer bullet layer and make them not collide and then make the player bullets not collide with raycast? thanks ill mess with it, im kinda new to the layer physics stuff

avatar image TimBorquez · Aug 21, 2013 at 08:03 AM 0
Share

ok yeah that solved my problem im dumb haha, thanks!

i made two bullet layers not colliding with eachother and made ignore raycast layer not collide with the player's bullet layer

avatar image Ejlersen · Aug 21, 2013 at 05:41 PM 0
Share

No problem :)

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

16 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

Related Questions

What drawback of frequently changing of Game Object's Layer? 0 Answers

Ignore collisions between a certain collider and a layer 2 Answers

Remove collider vs putting on a layer that ignores collisions 2 Answers

Detecting collisions with raycast or not? 1 Answer

Raycast doesn't register Rigidbody 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