Results 1 to 2 of 2
  1. #1
    Join Date
    May 2011

    93 - Random Num Gen, R&D, Session 4, Pt. 5

    At the point were I add 'FractionalPart'

    var ux = (int)x + FractionalPart(x);
    var uy = (int)y + FractionalPart(y);
    it's not happy, im not sure what the issue is because when I add the FractionalPart to it it's apperently not in the right format? I've written the exact same thing as Lee while following along in that specific video.

    While digging around, I suppose it's the region thing, I found this

    Since I live in Europe the only thing I have to modify is the dot.

    s = s.Substring(s.IndexOf(".") + 1);
    should be
    s = s.Substring(s.IndexOf(",") + 1);

    were the s.IndexOf(",") has a comma in its paranthesis.

    I hope this post will help others who might not notice lee saying it in the video that depending on your country you might need to change that line of code.

    Edit 2:

    When going furthere in this video series, when you start using noise inside of Unity you might need to switch it back again. At least for me I had to switch it back to a dot again instead of a comma, while in the console app it takes in a comma when you live in Europe. So for Unity, use s = s.Substring(s.IndexOf(".") + 1);
    Last edited by Blackbladez; 02-17-2012 at 02:37 PM.

  2. #2
    Join Date
    Jul 2012
    Ankara, Turkey
    Thanks a lot for this! I had the same problem.

Posting Permissions

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