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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by TheAMes · Oct 24, 2013 at 09:22 AM · raycastcollideranimatormecanim

Raycast wont hit colliders on mecanim

Ok so I've been battling with this for a few days now and have had to resort to asking for help.

I am using standard raycast from the camera position through mouse position to apply a small impulse to a collider/rigid body when it's clicked. Not my overall goal more of a test.

This works fine if I drop a simple cube in to my scene.

Now I add a 3d character, I have tried both an export from DAZ 3D and also the Robot on the Unity mecanim tutorial, results are the same for both.

I apply humanoid animations, create a simple animator controller, set an idle animation, so far so good, the robot stands there doing the idle animation.

I click on him and no raycast is hit, obviously cause I have no colliders. So I go ahead and create a ragdoll for the robot, this creates all the colliders etc yet clicking on the locations of these colliders they are never hit, the raycast just reports that it hit the ground plane

If during run time i disable the animator the robot collapses to the floor using physics and the ragdoll (this is my overall aim, he gets shot and animator is switched off etc) and he lies there on the floor. If I now click on his body parts it hits correctly, impulses are applied to the individual colliders nicely

I understand that I wouldnt be able to apply an impulse to the collider during an animation as it would have no effect, what I am confused about is why won't the ray cast collide with these colliders?

I thought possibly it was my raycast at fault, but if I import the UFPS package the bullets will not collide with the colliders during an animation, they hit the floor behind him, if I disable the animator the bullets hit the colliders as expected

Any info here would really be appreciated as its been a few days now, I'm quite new to Unity too

Thank you

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

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

14 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

Related Questions

Raycast occasionally won't hit colliders on Mecanim animated characters (but hits perfectly if Animator is disabled) 1 Answer

Do animations affect the accuracy of a collider? 0 Answers

How do you accurately sync the position of colliders on an animated character in the physics engine? 1 Answer

Why is Physics.CheckCapsule always returning true? 1 Answer

Animator component makes Character fall a bit 3 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