Results 1 to 8 of 8

Thread: Lean angle speedometer origin

  1. #1
    Tuner in Training
    Join Date
    Sep 2015
    Posts
    43

    Lean angle speedometer origin

    I put together this template including speed, lean angle and G-forces. The custom lean angle indicator shows negative values for the left lean angle and positives for the right lean. However the widget bar movement starts at -60. How can I make it start from 0?

    Also I added maximum values for each widget but the text is not aligned correctly to the square box. How do I right justify the text in the green boxes?


  2. #2
    HPT Employee Weston@HPTuners's Avatar
    Join Date
    Jul 2014
    Location
    39.735034, -103.894459
    Posts
    868
    Quote Originally Posted by Spaghetti View Post
    I put together this template including speed, lean angle and G-forces. The custom lean angle indicator shows negative values for the left lean angle and positives for the right lean. However the widget bar movement starts at -60. How can I make it start from 0?
    In this example, you are using a gauge display that's in "Graph" mode, which will fill the area from the defined minimum until the current value. Unfortunately, there's not presently a direct way to make that instead originate from the zero point when in this mode. I should be able to add that feature in the next update (will be RaceRender 3.4.5 or newer)... When it is available, look for a "Graph Zero" Mode option for the gauge.

    Also I added maximum values for each widget but the text is not aligned correctly to the square box. How do I right justify the text in the green boxes?
    By default, most Text-based displays will be in auto-size mode, which may effectively center or left-justify them, depending on the circumstances. To take control over this, such as to make it right-justified, you just need to double-click on the display to open its properties box, un-check the "Fix Box to Text" option, and then change the "Alignment" setting to "Right". Note that un-checking the "Fit Box to Text" option will usually shift the text box alignment and increase its size slightly, so you'll want to adjust that afterward.

  3. #3
    Tuner in Training
    Join Date
    Sep 2015
    Posts
    43
    Quote Originally Posted by Weston@HPTuners View Post
    By default, most Text-based displays will be in auto-size mode, which may effectively center or left-justify them, depending on the circumstances. To take control over this, such as to make it right-justified, you just need to double-click on the display to open its properties box, un-check the "Fix Box to Text" option, and then change the "Alignment" setting to "Right". Note that un-checking the "Fit Box to Text" option will usually shift the text box alignment and increase its size slightly, so you'll want to adjust that afterward.
    These are the enhanced Maximum text labels. I don't see the "Fit Box to Text" option in the script editor or properties window.

  4. #4
    HPT Employee Weston@HPTuners's Avatar
    Join Date
    Jul 2014
    Location
    39.735034, -103.894459
    Posts
    868
    Quote Originally Posted by Spaghetti View Post
    These are the enhanced Maximum text labels. I don't see the "Fit Box to Text" option in the script editor or properties window.
    In the case of the Enhanced display objects, the text alignment will be set by the script. For the "Maximum" display included with RaceRender, you'll want to go into its Foreground script, then find this line at the bottom:

    DrawNumber(MaxValue, Decimals, OffsetX, 0, NumberColor, FontSize, 0);

    Now change that last 0 into AlignH_Right, so it looks like this: DrawNumber(MaxValue, Decimals, OffsetX, 0, NumberColor, FontSize, AlignH_Right);

    That zero was a relic from back before we had horizontal alignment constants defined for the scripts, and it's the same as using AlignH_Left. You can now use one of these names in its place:

    AlignH_Left
    AlignH_Center
    AlignH_Right

  5. #5
    Potential Tuner
    Join Date
    Aug 2016
    Posts
    2
    I am trying to make a custom scale Speedo that is what is used in the new Focus RS. See this picture:


    From 0 to 60 km/h, it shows every 10 km/h with 5 km/h minor ticks, then it shows every 20 km/h with 10 km/h minor ticks and alternating sizes of font.

    I found the check box to "Split at Data Point", but that does not allow a second scaling after the split. Please advise if it is possible to make this dual-scale type of gauge or if it will need to be a compromise.

    Cheers,
    Chris

  6. #6
    HPT Employee Weston@HPTuners's Avatar
    Join Date
    Jul 2014
    Location
    39.735034, -103.894459
    Posts
    868
    Quote Originally Posted by bimmer635csi View Post
    I am trying to make a custom scale Speedo that is what is used in the new Focus RS. See this picture:


    From 0 to 60 km/h, it shows every 10 km/h with 5 km/h minor ticks, then it shows every 20 km/h with 10 km/h minor ticks and alternating sizes of font.

    I found the check box to "Split at Data Point", but that does not allow a second scaling after the split. Please advise if it is possible to make this dual-scale type of gauge or if it will need to be a compromise.

    Cheers,
    Chris
    The "Split at Data Point" feature could be set to 60 here, with a Relative Angle of about 90, but that will still maintain the large and small tick intervals (and numbering intervals) throughout the entire range of the gauge... There will just be a different amount of space between them before and after that split point.

    For something this customized, you may be better off bringing in a background image that has it setup the way you want, and then using RaceRender to overlay just the needle onto that image, as described by Option 1 here: http://RaceRender.com/RR3/docs/HowTo-ComplexGauge.html

  7. #7
    Potential Tuner
    Join Date
    Aug 2016
    Posts
    2
    Quote Originally Posted by Weston@HPTuners View Post
    The "Split at Data Point" feature could be set to 60 here, with a Relative Angle of about 90, but that will still maintain the large and small tick intervals (and numbering intervals) throughout the entire range of the gauge... There will just be a different amount of space between them before and after that split point.

    For something this customized, you may be better off bringing in a background image that has it setup the way you want, and then using RaceRender to overlay just the needle onto that image, as described by Option 1 here: http://RaceRender.com/RR3/docs/HowTo-ComplexGauge.html
    So I made the template based on your suggestion. It wasn't terribly difficult, as I was expecting. But it isn't perfect either.

    Anyway, I have trouble now because the template is too large to put on the forum as an attachment. And when I zip it, it is small enough, but the forum won't allow that file type. Any suggestions?

  8. #8
    HPT Employee Weston@HPTuners's Avatar
    Join Date
    Jul 2014
    Location
    39.735034, -103.894459
    Posts
    868
    Quote Originally Posted by bimmer635csi View Post
    So I made the template based on your suggestion. It wasn't terribly difficult, as I was expecting. But it isn't perfect either.

    Anyway, I have trouble now because the template is too large to put on the forum as an attachment. And when I zip it, it is small enough, but the forum won't allow that file type. Any suggestions?
    The large file size is most likely due to including background images. In this case, a Dropbox or similar link may work best right now. As this type of use is becoming more popular, I will be exploring the possibility of utilizing some lossless compression within RaceRender in the future...