Instanced child node won't spawn when game run on Android

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By BG.13

I have a player node that shoots out an arrow when pressing a button. It works fine on my PC but when I exported it to Android the arrow scene won’t spawn even though the shoot function that calls the arrow still works perfectly. The arrow is a Kinematic Body.

This is my script:

func _Spawn_Arrow():
var arrow = ArrowScene.instance()
var arrow_spawn_pos = $Body/Bow_Hand/Arrow_Spawner
arrow.global_position = arrow_spawn_pos.global_position
arrow.direction = (arrow_spawn_pos.global_position - get_global_mouse_position()).normalized()
arrow.rotation = arrow.direction.angle()
arrow._launch(arrow.direction * Arrow_Speed)

1 Like
:bust_in_silhouette: Reply From: Wakatta

There is obviously and error in your code somewhere and it can be as simple as a scene resource not being exported.

The only way to know for sure is to enable Deploy with remote debug under the Debug menu to see exactly what is taking place as Godot seems to ignore code that causes errors on Android possibly to prevent an app crash.

Hello have you yet found a solution to this problem, i too have the same issue

Did you find any solution to this?