fix: look_at normal and up aligning
This commit is contained in:
parent
f02dbf44ac
commit
144e18b2d0
|
@ -39,7 +39,8 @@ void HitscanMuzzle::shoot() {
|
|||
get_tree()->get_current_scene()->add_child(effect);
|
||||
Vector3 const point{ get_collision_point() };
|
||||
Vector3 const normal{ get_collision_normal() };
|
||||
effect->look_at_from_position(point, point + normal);
|
||||
Vector3 const position{ get_global_position() };
|
||||
effect->look_at_from_position(point, point + normal, (point - position).normalized());
|
||||
} else if (effect_as_node) {
|
||||
effect_as_node->queue_free();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue