Search Unity

Glass of orange juice and PS Move Controller

Discussion in 'Physics' started by metzgerhannes, Feb 6, 2015.

  1. metzgerhannes

    metzgerhannes

    Joined:
    Feb 2, 2015
    Posts:
    2
    Hi guys,
    I'm searching a way to create a glass filled with orange juice that behaves a bit realistic when moving it the Playstation Move Controller. It doesn't need to be fancy, it would be enough if the the surface of the juice stays horizontal while rotating the glass. And in the case that the juice would leak out of the glass it could just fade transparent.
    But I really don't know how to build something like this. My first thoughts were to create a boolean geometry so that a cube (which always stays horizontal) would cut of the orange juice geometry...
    Do you guys have any suggestions for me?
    Thanks in advance ;)
    Hannes
     
  2. metzgerhannes

    metzgerhannes

    Joined:
    Feb 2, 2015
    Posts:
    2
    Hi again, I finally found a solution. I made an animation in Cinema4d with a glass that rotates to the side. And the juice mesh inside made blend shape animation to simulate that the surface of the juice always stays horizontal.
    Then in Unity I wrote a script that connects the rotation of the glass object to the blend shape. And to the end of the blend shape animation it just fades out the juice mesh via alpha.