Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Can raycast or linecast hit a skinnedMeshFilter with no collider?

Discussion in 'Scripting' started by glom1envisage0, Feb 23, 2012.

  1. glom1envisage0

    glom1envisage0

    Joined:
    Apr 3, 2011
    Posts:
    167
    I have an object that I want to make transparent when 'blocking' the player's view of the character but my 'SeeThroughObjects' script only works on colliders. I tried "hit.renderer" but that didn't work. I can't attach a collider because the object is awkwardly rotated and scaled in blender such than no matter how much 'tinkering' I do(I've spend hours), I can't get a collider to even slightly line up with the renderer.
     
  2. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,617
    Can you make a parent object with a collider, then stick your awkward object in it as a child and set render/material properties recursively?