x


Vertical Slider Camera

Hello, I am writing a camera script that uses the VerticalSlider GUI to rotate about the world Y axis. i know the VSlider returns a float type value which is how i am controlling the direction in which the camera rotates (ie. if the value ranges from 0.0 to 100.0, when the value is equal or less than 35.0, the camera rotates). is there a function to find out if the Vertical Slider BUTTON has been pressed (idealy i would like to imitate the VSlider returning a boolean as well as the standard float value)? i have other buttons in place so i cant use the input.mouseButton.

more ▼

asked Dec 07 '10 at 12:03 AM

William Hewitt gravatar image

William Hewitt
1 1 1 1

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Is there a function to find out if the Vertical Slider BUTTON has been pressed?

No. You have to create your own GUI logic to do this. The easiest solution candidate I can think of is to use GUI.RepeatButton and move that along with mouse input when it is pressed.

Check the docs about how to extend the GUI to create your own controls.

more ▼

answered Dec 07 '10 at 12:22 AM

Statement gravatar image

Statement ♦♦
20.1k 35 70 175

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x30
x5

asked: Dec 07 '10 at 12:03 AM

Seen: 1012 times

Last Updated: Dec 07 '10 at 12:03 AM