This commit is contained in:
aozhiwei 2023-11-03 11:41:58 +08:00
parent fbfbd24707
commit 1eb992e9f8

View File

@ -218,6 +218,13 @@ static void InternalCreateBullet(BulletInfo& bullet_info)
bullet_info.bullet_num);
glm::vec4 v = transform * gun_muzzle_position;
bullet_born_offset = glm::vec3(v.z *10*1, v.y, v.x*10*-1);
{
Buff* buff = c->GetBuffByEffectId(kBET_Scale);
if (buff) {
float param1 = buff->meta->GetBuffParam1(buff);
bullet_born_offset *= param1;
}
}
bullet_info.bullet_born_pos.FromGlmVec3(c->GetPos().ToGlmVec3() + bullet_born_offset);
bullet_info.bullet_dir = c->GetShotDir();
}