From 7efd4c2df63f22fcc1957a1f70a7249f6f079764 Mon Sep 17 00:00:00 2001 From: lvlong Date: Wed, 25 Mar 2015 10:04:51 +0800 Subject: [PATCH] replace setAdditionnalTransform() --- cocos/3d/CCSprite3D.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cocos/3d/CCSprite3D.cpp b/cocos/3d/CCSprite3D.cpp index 7e05d46f6e..92670db114 100644 --- a/cocos/3d/CCSprite3D.cpp +++ b/cocos/3d/CCSprite3D.cpp @@ -519,7 +519,16 @@ void Sprite3D::createNode(NodeData* nodedata, Node* root, const MaterialDatas& m } } - setAdditionalTransform(&nodedata->transform); + Vec3 pos; + Quaternion qua; + Vec3 scale; + nodedata->transform.decompose(&scale, &qua, &pos); + setPosition3D(pos); + setRotationQuat(qua); + setScaleX(scale.x); + setScaleY(scale.y); + setScaleZ(scale.z); + } } else