User Tag List

Results 1 to 3 of 3

Thread: Help with calculations!

  1. #1
    Clicker

    Fusion 2.5 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    J3sseM's Avatar
    Join Date
    Feb 2013
    Location
    Finland
    Posts
    868
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Help with calculations!

    Hey guys!

    To cut it as short as possible:
    My player is black silhouette and when the player walks under triangle shaped light, I want to highlight outer lines of player.
    To do that "drop shadow" with correct settings looks pretty good. Basically graphical side is all set, but need help how to calculate following:

    Angle.
    When player is in the middle of a light triangle, the angle of drop shadow must be 180 so the light comes from straight up.
    The angle should go from around 240 (Left side) to 120 (Right side) so that it's 180 in the middle.
    My light triangle is hanging from the ceiling and slowly moving from side to side.
    I have action point set in the middle of a triangle which I have been using when trying to calculate the angle.

    So I have paired the effect parameter "angle" to a value which I have been trying to calculate.
    I think there is simple solution for this. Currently I'm calculating my players x position, and minus from it my lights action point. I use ABS so it won't go to negative numbers. But I'm having hard time to make it work in specific range.

    Any advise?

    - Jesse

  2. #2
    Clicker

    Fusion 2.5 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    J3sseM's Avatar
    Join Date
    Feb 2013
    Location
    Finland
    Posts
    868
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Huh again!
    I think I figured it out!
    I did it like this:
    Player is overlapping with light_system
    X position of player is lower than XActionPoint( "light_system" ) = Abs(X( "player" )-XActionPoint( "light_system" ))/4+180

    And for greater values:

    X position of player is greater than XActionPoint( "light_system" ) = (XActionPoint( "light_system" )-X( "player_trigger" ))/4+180

    It works!
    But I would like to hear if you have more sophisticated way to do it.

    EDIT: Oh yeah still gotta figure how to do similiar thing with it's alpha, so it only fades in and out in light.
    It seems when I try to divide numbers it does not work probelly. Only displays full numbers. Hymm.

    - Jesse

  3. #3
    Clicker

    Fusion 2.5 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    J3sseM's Avatar
    Join Date
    Feb 2013
    Location
    Finland
    Posts
    868
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I got it working by doing it manually.
    Anyway I don't understand, when I duplicate the object to use it with other lights, only the last duplicate works? Why?

Similar Threads

  1. calculations via string
    By Skyhunter in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 26th November 2012, 07:31 PM
  2. Heavy calculations
    By King_Cool in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 25th July 2012, 01:39 AM
  3. mmf 2 is silt! - calculations per second
    By EasySite in forum Multimedia Fusion 2 - Technical Support
    Replies: 24
    Last Post: 7th August 2010, 03:32 AM
  4. Need help here with distance calculations.
    By Ravenius in forum File Archive
    Replies: 2
    Last Post: 25th December 2007, 12:21 PM
  5. Calculate Calculations?
    By Looki in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 11th January 2007, 05:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •