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 sofuscraft · Sep 27, 2020 at 05:43 PM · collisioncollision detectiontreeaxe

Child of FPSController cannot collide with anything?

Hello. So I'm pretty new to Unity, and I'm trying to implement an axe cutting feature into my game. Everything has been going smoothly until I had to make the tree fall when I hit it with my axe. The way I'm doing this atm, is when I click "e" while I'm looking at the axe, it becomes the child of a gameobject, that is a child of my charactercontroller, so as to make it "equipped". The problem is, while the axe is equipped, it will not collide with anything, and that's a problem, since I need the axe to collide with the tree so I can make the tree fall when I swing at it.

Here's my hierarchy: ![alt text][1]

I've been looking all over the internet for a solution, but I just can't find one. (I've also tried the "OnTriggerEnter" method instead of the "OnCollisionEnter" method, but since I need to detect how much force the axe hits the tree with, it doesn't work.

I would really appreciate if you tried to help! - Pringle [1]: /storage/temp/168277-hierarchy.png

hierarchy.png (5.1 kB)
Comment
Add comment · Show 11
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 aimana-shole · Sep 27, 2020 at 07:12 PM 0
Share

@sofuscraft Not sure, but i guess you're missing a Rigidbody. For a Collision to work, at least one of the colliding Objects needs a Rigidbody. Then onCollisionEnter should work.

avatar image sofuscraft aimana-shole · Sep 27, 2020 at 07:43 PM 0
Share

I already do have a Rigidbody, it is kinematic though, since the axe will just bounce around while equipped if it's on. I did try to turn off kinematic mode, but nothing changed.

avatar image aimana-shole sofuscraft · Sep 27, 2020 at 09:17 PM 0
Share

If you want to use a Collision with a kinematic Rigidbody, you have to set "Enable Kinematic Static Pairs" --> https://answers.unity.com/questions/209656/having-a-kinematic-rigidbody-detect-collision-with.html But as you've wrote you tried it with a non kinematic Rigidbody, check the following cases:

  • Rigidbody and a Collider(Trigger unchecked) attached to the Axe

  • Script on the Axe with a onCollisionEnter.

  • Collider(Trigger unchecked) on the Tree.

  • Physicslayers are set to interact with each other

Show more comments

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

208 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 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 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

OnParticleCollision Question (Image included) Particle Decal Hanging off Edge 1 Answer

How to check if two objects collide without a collider 1 Answer

Rigidbody MoveTo considering collisions 1 Answer

Smooth movement for the block upon player collision,Smooth box movement 0 Answers

How does Unity detect collision? 0 Answers


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