![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | MrHells |
My problem comes when I try spawning a Scene that is a rigidbody with a 3d collider and a 3d mesh in a Spatial node inside de “world” node. It lags…
I saw some tutorials about pre loading your 2d particle materials, but I could not find such a tutorial for 3d models and it materials, I am new with godot, so I am trying to understand it, but alone I can’t.
I replied to a similar question recently. There’s a video of Bastian on the subject: https://www.youtube.com/watch?v=Cg4ZT6X0ghs
MrEliptik | 2021-03-21 10:23
I tried it, but it still hickup… Maybe I did wrong, but I tried so many times.
The code I use is
(in the player script)
var projectile = preload(“res://GameObjects/Entities/place_holder_shoot.tscn”)
onready var player_shoots = get_tree().get_root().get_node(“World/Player_shoots”)
the input function call the shoot function whenever mouse1 is pressed
func Shoot()
player_shoots.add_child_below_node(player_shoots, projectile.instance(), true) ( I also tries with player_shoots.add_child(projectile.instance()))
and also, I need to instanciate every time I shoot, because otherwise it will spawn only one at time.
MrHells | 2021-03-21 16:37