Search Unity

Visualize Force/Velocity

Discussion in 'Physics' started by PatrickKa, Dec 8, 2014.

  1. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    245
    Hey,

    probably you all know games that show forces/velocity using red colors (bridge building, fighting games, etc.). The more force is applied the more red the object becomes.

    I want to build something similiar. It does not need to be perfect but it should give a good and believeable feedback to the user.

    Some older threads stated that this is impossible to do in Unity but we are almost in year 2015 now and I simply cannot believe that Unity is not capable of doing this somehow...

    So how could you achieve this using Unity?
     
    dhanrajsinh24 likes this.
  2. A_never_kill

    A_never_kill

    Joined:
    Jan 7, 2014
    Posts:
    81
    Hello ,
    Can You elaborate what exactly you want to say.

    Thanks
     
  3. Uberpete

    Uberpete

    Joined:
    Jan 16, 2014
    Posts:
    78
    It is possible, you just need to think creatively!

    Depends on how realistic you want it (we can quite quickly delve into the wonderful world of Partial Differentiation :p). At the top of my head, a nice way to do this would be something like this:

    1. Stick the object that will go red in a separate layer
    2. Send raycasts downwards from objects and if they hit the layer, inform the stress script
    3. Depending on the stress, interpolate between your texture and a red texture