Skocz do zawartości

Featured Replies

Napisano

Mam box'a :-) Chce by mozna go bylo przesuwac w viewport'cie maksymalnie np. o 10 jednostek w kazdej osi.

 

when transform $box01 changes do (

if $box01.pos.X>10 then $box01.pos.X=10

)

 

Taka postac skryptu dziala, ale tylko wzgledem osi X (oczywscie ogranicza ruch tylko w prawo). Gdy dopisuje:

 

if $box01.pos.Y>10 then $box01.pos.Y=10

 

i alternatywnie dla Z to nie dziala. O co chodzi?

  • Odpowiedzi 4
  • Wyświetleń 1,7k
  • Created
  • Ostatniej odpowiedzi

Top Posters In This Topic

Napisano

Napisałeś tak:

if $box01.pos.Y>10 then $box01.pos.X=Y

 

Nie powinno być:

if $box01.posY>10 then $box.posY=10

?

Napisano

Faktycznie dziwne. Rzucilem to pytanie na forum cgtalku, zobaczymy co tam wymysla.

Napisano

Dostalem taka odpowiedz:

This might not be exactly an error, but it is a limitation. I *assume* it is caused by the way interactive manipulations are applied to the controller hierarchy and the notifications sent to the system and MAXScript.

 

A workaround I found is to assign a Bezier Position controller to the Position track - when there are no sub-controllers, all 3 axes are being processed correctly.

 

Another workaround is to use the handerAt:#redrawViews option. The object does not stop when the Y reaches the limit, but as soon as the view is redrawn, the object jumps back to the limit.

 

And of course the Limit controller in Max 8 would be the clean solution to the problem.

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Powiadomienie o plikach cookie

Wykorzystujemy cookies. Przeczytaj więcej Polityka prywatności