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 Olgo · Jan 12, 2014 at 08:46 AM · rigidbodycharactercontrolleroncollisionenter

Strange collision happenings...

Just had a weird new symptom begin to pop up and can't figure out why it's happening. It only recently started experiencing it and I can't think of any change I've made that would affect it...

  1. I have gameobjects with rigidbodies moving via AddForce(), lets call them 'fireballs'

  2. I have gameobjects with char controllers moving via Move(), lets call them 'enemies'

  3. The 'fireballs' are supposed to OnCollisionEnter() with the enemies and explode and do damage then destroy themselves.

  4. Instead, the fireballs push the enemies until the enemies can no longer move, THEN OnCollisionEnter is called and the expected behaviour happens.

  5. When the enemies are standing still, everything occurs as expected. It is only when they are moving that I experience this behaviour.

Any ideas what could cause this? thanks guys. I've had it up to here with colliders and their nuances lately... I'm holding my hand at brow level.

Furthermore.... I've just thought of a solution as I'm typing this... I'm going to make the sphere collider attached to the fireball "isTrigger = true," however, that doesn't explain why the Collider doesn't detect the Collision until it has pushed the enemy as far as it can go... so i'm very curious and would still like to ask this question anyway.

thanks!

Comment
Add comment · Show 1
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 morbidcamel · Jan 12, 2014 at 11:09 AM 0
Share

I'm pretty sure collision event only fire when a rigid body is attached to the enemies.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by morbidcamel · Jan 12, 2014 at 11:09 AM

for a collision event to fire I'm pretty sure you need to attach a rigid body to the enemy

Comment
Add comment · Show 2 · 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 Olgo · Jan 12, 2014 at 04:15 PM 0
Share

nope, it was working before just fine, and as far as components on game objects, nothing changed.

avatar image morbidcamel · Jan 12, 2014 at 04:25 PM 0
Share

If your fireballs move I a straight line you can do a Raycast to see if it's going to hit the target. The advantage of that is you can spawn a damage prefab before it hits that target. I don't know why it used to work differently but It sounds like maybe it's just doing what it is told.. Have you checked the mass of the rigidbodies. If your fireballs have a huge mass surely it will react like his..

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

19 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

Related Questions

CharacterController and Normal rigidbody Box Collider Collision issues 0 Answers

Two Character Controllers Colliding... 0 Answers

Does OnCollisionEnter only get called when the scripted object initiates the collision? 4 Answers

Can't use Rigidbody or Character Controller 0 Answers

Stop objects from going through each other with rigidbodies 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