1
This commit is contained in:
parent
0551bf8e75
commit
873a9b830a
@ -494,13 +494,22 @@ void InternalShot(Creature* c,
|
||||
bullet_born_angle = -bullet_born_angle;
|
||||
}
|
||||
float old_bullet_born_angle = bullet_born_angle;
|
||||
GlmHelper::RotateY(bullet_born_offset, bullet_born_angle);
|
||||
//GlmHelper::RotateY(bullet_born_offset, bullet_born_angle);
|
||||
|
||||
auto transform = glm::rotate(hero_transform,
|
||||
bullet_born_angle * A8_PI,
|
||||
glm::vec3(0.0, 1.0, 0.0));
|
||||
glm::vec4 gun_muzzle_position(0.0, 0.0, 0.0, 0.0);
|
||||
CalcGunMuzzlePosition(c, weapon_lv, weapon_meta, shot_animi, gun_muzzle_position, bulletIdx, bulletNum);
|
||||
#ifdef DEBUG
|
||||
gun_muzzle_position +=
|
||||
glm::vec4(
|
||||
bullet_born_offset.z / 10.0f,
|
||||
0,
|
||||
bullet_born_offset.x / 10.0f,
|
||||
0
|
||||
);
|
||||
#endif
|
||||
glm::vec4 v = transform * gun_muzzle_position;
|
||||
bullet_born_offset = glm::vec3(v.z *10*1, v.y, v.x*10*-1);
|
||||
bullet_born_pos = c->GetPos().ToGlmVec3() + bullet_born_offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user