x


How can set Max Speed in Action script

hi, Please help me , i want to set the objects maximum and minimum rotation speed when ever mouse, this is my rotation AS

newRotationY = getProperty("/mouse", _x)-getProperty("/a", _x);

cRotationX = newRotationX - (newRotationX - cRotationX) / 1.100000E+000;
cRotationY = newRotationY - (newRotationY - cRotationY) / 1.100000E+000;
rotationX = -int(cRotationX / 300);
rotationY = int(cRotationY /300);
rotationZ = 0;

if (Number(rotationY)>41) {
    rotationY = "41";

} else if (Number(rotationY)<Number(-42)) {
    rotationY = "-42";
}
more ▼

asked Jan 11 '11 at 06:01 PM

anas gravatar image

anas
1 1 1 1

Can you format your code so it's readable and put it in code tags? If not, many people wont even look twice.

Jan 11 '11 at 06:02 PM Justin Warner

This isn't a place for action scripting though, this is a place for unity questions and answers.

Jan 11 '11 at 07:16 PM Statement ♦♦
(comments are locked)
10|3000 characters needed characters left

0 answers: sort oldest
Be the first one to answer this question
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:

x2158
x496
x355
x268
x14

asked: Jan 11 '11 at 06:01 PM

Seen: 1190 times

Last Updated: Jan 11 '11 at 07:15 PM