소수점 제어 익스프레션

포지션에 키프레임을 먼저 주시고 익스프레션을 아래처럼 만들어주시면 됩니다.
p=transform.position;
a=Math.round(p[0]);
b=Math.round(p[1]);
[a,b]

에펙 CS4 라면
xy축을 분리하시고

y축으로만 움직일 경우
a=transform.yPosition;
Math.round(a)
이렇게 주시면 되고
X축이라면
a=transform.xPosition;
Math.round(a)


--------------------------------


포지션에 익스프레션
0에서 100이면 하나의 축으로만 움직이잖아..

1.X축 고정일경우
[value[0] ,Math.floor(value[1])]

2.Y축 고정일경우
[Math.floor(value[0]),value[1] ]

Math.floor()를 사용하면 정수값으로 변환

유용한 익스프레션...

by 주남 | 2009/02/21 10:32 | ː에펙

◀ 이전 페이지          다음 페이지 ▶