Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | daniel500013 |
Hi i have some question because while instance bullet hole i tried rotation this to player so i made this script (i made scripts in c#)
PackedScene bullet = (PackedScene)ResourceLoader.Load("res://weapon/scene/BulletHole.tscn");
Spatial bullet_scene = (Spatial)bullet.Instance();
bullet_scene.Translation = (Vector3)collision.GetCollisionPoint();
bullet_scene.LookAt((collision.GetCollisionPoint() + collision.GetCollisionNormal()), Vector3.Up);
GetParent().GetNode<Spatial>("bullets").AddChild(bullet_scene);
but when i start game and tried shoot some objects to test my bullet hole rotation works i got this error and i don’t know why i got this