Git Product home page Git Product logo

Comments (6)

JScott avatar JScott commented on June 18, 2024

For sure! If it won't highlight then the problem is having the grip's sphere collide with the object. NearestObject() is doing the heavy lifting there, so OnTriggerEnter isn't being thrown.

The thing that immediately stands out to me are the two colliders and one of them being a concave mesh collider. I'm not sure what Unity does with two colliders so you might want to chose one and delete the other. You should also make the mesh one convex if you keep it. I expect that one of those 999+ errors is going to be Unity telling you that Rigidbodies colliders in Unity 5 must be concave.

Play around with that a bit and let me know how it goes. If you're still getting trouble then I'll have to try to recreate your scene and see if I can reproduce (and fix) the issue you're seeing.

from vivegrip.

ZhengzhongSun avatar ZhengzhongSun commented on June 18, 2024

I have removed the mesh collider, but I still cannot move the bird. Could you have a try about the obj?
bird.zip

from vivegrip.

JScott avatar JScott commented on June 18, 2024

I'll give it a shot when I have some time and let you know how it goes. Are there any components or scripts affecting the bird object other than what I can see in your screenshot?

from vivegrip.

ZhengzhongSun avatar ZhengzhongSun commented on June 18, 2024

Thank you very much! I don't think there are any components or scripts affecting the bird object .

from vivegrip.

JScott avatar JScott commented on June 18, 2024

Figured it out: it was your model. I'm not sure why Unity didn't like it but the object centre was way off and it was preventing the colliders from working properly. I recentred it in Blender and brought it back in and it works just fine:

original centre
fixed centre
bird comparison

The original you sent is on the left and the fixed OBJ is on the right. For your convenience, here's the model:

bird_fixed.zip

So many of my problems come from models not exporting properly and Unity doing weird things as a result :)

from vivegrip.

ZhengzhongSun avatar ZhengzhongSun commented on June 18, 2024

Thank you very much! I will try it again.

from vivegrip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.