Narusia
17-04-2009 05:13:26
hi guys. i korean. no English.. but i have question.
My game used TriggerObject to Bullet.
player shoot TriggerBullet.then On method, Setpostion method call.
First TriggerBullet callback method is called. and continue shoot. 1 2 3 4..
after TriggerReport callback OnEnter method is not called.
i saw Remote Debugger Enter the player in TriggerObject.
but callback method is not called
why is this problem??
i don't khow. i guess it's prolbem happen i move TriggerObject to Update method. I found post in forum TriggerObject not move???
Please help me. what's the problem???
My game used TriggerObject to Bullet.
player shoot TriggerBullet.then On method, Setpostion method call.
First TriggerBullet callback method is called. and continue shoot. 1 2 3 4..
after TriggerReport callback OnEnter method is not called.
i saw Remote Debugger Enter the player in TriggerObject.
but callback method is not called
why is this problem??
i don't khow. i guess it's prolbem happen i move TriggerObject to Update method. I found post in forum TriggerObject not move???
Please help me. what's the problem???
//-----------------------------------------------------------------------------------------------------------------
/*
시작 포인트 설정
*/
void PNGParticleBulletTrigger::SetPoisition(const Vector3& kPosition)
{
m_pkActor->setGlobalPosition(toNxVector(kPosition));
}
//-----------------------------------------------------------------------------------------------------------------
/*
업데이트
*/
void PNGParticleBulletTrigger::Update(const Ogre::FrameEvent& evt)
{
if(m_bOn & m_bLiveBullet)
{
Vector3 kPos;
PNGBullet::Update(evt);
// 회전 모드일때
if(m_bRotationMode)
{
Quaternion kSrcQut = toOgreQuaternion(m_pkActor->getGlobalOrientationQuat());
Quaternion kConversionQut(Radian(Math::DegreesToRadians(m_fAngleSpeed * evt.timeSinceLastFrame)), Vector3(0.0, 0.0, 1.0f));
m_pkActor->setGlobalOrientationQuat(toNxQuaternion(kSrcQut));
}
kPos = toOgreVector(m_pkActor->getGlobalPosition() + toNxVector(m_kDirection * m_fVelocity * evt.timeSinceLastFrame));
m_pkActor->setGlobalPosition(toNxVector(kPos));
//CollisionCheckUpdate();
}
}
//-----------------------------------------------------------------------------------------------------------------
/*
총알을 사용 할때
*/
void PNGParticleBulletTrigger::On(PNG_REQUIRED_MGR_INFO* pkShouter)
{
m_bOn = true;
Vector3 kPos = toOgreQuaternion(m_pkActor->getGlobalOrientationQuat()) * m_kCollisionBoxData.kSrcPos;
m_pkActor->clearActorFlag(NX_AF_DISABLE_COLLISION);
// [1/19/2009 Narusia]
// 쏜사람 정보를 넣어준다.
m_spkBulletSourceInfo->SetShouter(pkShouter);
m_bLiveBullet = true;
//-----------------------------------------------------------------------------------------------------------------
/*
총알을 다 사용 했을때
*/
void PNGParticleBulletTrigger::Off()
{
m_bOn = false;
m_spkParticle->OffParticle();
m_spkParticle->SetPosition(g_kBulletNonePos);
m_pkActor->setGlobalPosition(toNxVector(g_kBulletNonePos));
m_pkActor->raiseActorFlag(NX_AF_DISABLE_COLLISION);
ResetBullet();
}