Search Unity

Collision info without physics

Discussion in 'Scripting' started by wmaass, Nov 2, 2011.

  1. wmaass

    wmaass

    Joined:
    May 24, 2010
    Posts:
    10
    For my mini golf game I find the built in physics to be problematic. I can get close to the result I want but not close enough. I have done a mini golf game using other engines in c++ where I have my own ball rolling code. It works perfectly for what I need. For this I need access to collision info without the internal physics engine applying forces to the ball. Specifically I need collision normals. Thus far I have not found a way to get this info without the built in physics taking over. This is also going to be important down the road should I want to do a full blown golf game where lift, drag, magnus force must be integrated. Is there a way to access collision info without the built in physics?
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    if nothing moves physically, there is no collision and you will not get any physical collision properties.

    you will have to calculate that all yourself basing on ray casts, extracting the hit triangle and calculating its normal I fear
     
  3. wmaass

    wmaass

    Joined:
    May 24, 2010
    Posts:
    10
    Thanks dreamora. That or just endlessly tweak physics materials and settings I suppose.
     
  4. themusicdork

    themusicdork

    Joined:
    Nov 10, 2011
    Posts:
    2