티스토리 뷰

-  getChildByTag() : 메소드를 사용해서 태그로 부모에서 해당되는 자식의 객체를 리턴받을 수 있다.


Vec2 convertToNodeSpace(const Vec2& worldPoint) const;
- Converts a Vec2 to node (local) space coordinates. The result is in Points.

Vec2 convertToWorldSpace(const Vec2& nodePoint) const;
- Converts a Vec2 to world space coordinates. The result is in Points.

Vec2 convertToNodeSpaceAR(const Vec2& worldPoint) const;
- Converts a Vec2 to node (local) space coordinates. The result is in Points.

Vec2 convertToWorldSpaceAR(const Vec2& nodePoint) const;
- Converts a local Vec2 to world space coordinates.The result is in Points.

/== Same Method == / convertToNodeSpace(touch->getLocation())

Vec2 convertTouchToNodeSpace(Touch * touch) const;
- convenience methods which take a Touch instead of Vec2.
- return this->convertToNodeSpace(touch->getLocation());

Vec2 convertTouchToNodeSpaceAR(Touch * touch) const;
- converts a Touch (world coordinates) into a local coordinate. This method is AR (Anchor Relative).

로컬 로 터치 ( 월드 좌표 ) 좌표 로 변환합니다. 이 방법은 AR ( 앵커 상대 )입니다.



[출처] cocos2d-x 좌표 변환|작성자 농장주 상추





'Game Development > Cocos2d' 카테고리의 다른 글

cocos2d 함수setOpacity(), setVisible(), fadeTo()  (0) 2016.08.10
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함