佬,我看他们写附加对象的时候是这么写的:“
//附加对象攻击时 #这里也包括附加对象创建的特效
function sq_AddFunctionName(appendage)
{
appendage.sq_AddFunctionName("onAttackParent", "onAttackParent_appendage_common_burster")
}
function onAttackParent_appendage_common_burster(appendage, realAttacker, damager, boundingBox, isStuck)
{
if(!appendage) {
return;
}
// 버스터모드로 쳤다면..
if (appendage.isValid())
{
local centerX = sq_GetCenterXPos(boundingBox);
local centerZ = sq_GetCenterZPos(boundingBox);
local posY = damager.getYPos();
local hitEffAni = sq_CreateAnimation("","Character/Common/Animation/BusterMode/buster_hit_back_normal1.ani");
local hitBackEffObj = sq_CreatePooledObject(hitEffAni, true);
hitBackEffObj.setCurrentPos(centerX, posY - 1, centerZ);
sq_AddObject(realAttacker, hitBackEffObj, OBJECTTYPE_DRAWONLY, false);
local hitFrontEffAni = sq_CreateAnimation("","Character/Common/Animation/BusterMode/buster_hit_front_dodge.ani");
local hitFrontEffObj = sq_CreatePooledObject(hitFrontEffAni, true);
hitFrontEffObj.setCurrentPos(centerX, posY + 1, centerZ);
sq_AddObject(realAttacker, hitFrontEffObj, OBJECTTYPE_DRAWONLY, false);
}
}
”就他们用的是centerX, posY + 1, centerZ,而不是centerX, centerY, centerZ