Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

465
Views
how to use parameter to change scrollbar value in unity?

As u already know , The unity scrollbar value is between 0 to 1 I need a formula to change the value by the parameter I change in the inspector menu, like when I write 5 , the value changes to -5 to +5 , or when I write 10 the 0 to 1 changes to -10 to +10. I created one but its not using parameter Left_Eng = 2.0f * (2.0f * ScrollbarL.value - 1.0f) the formula changes 0 1 to -2 , +2 If anyone have an idea please tell me thanks a lot.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

So you want to map the range [0; 1] to [-x; x], right?

I think you basically already have it

  • [0;1]
  • * 2 => [0;2]
  • - 1 => [-1;1]
  • * x => [-x;x]

So together

var y = x * (2 * scrollValue - 1);
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!