Recreating a Sprite3D with RenderingServer

Godot Version

4.2.2

Question

Hi!

I’m trying to create a 3d bullet hell game, and in trying to optimize performance I’ve implemented object pooling and now attempting to use the servers directly, as others have suggested. For rendering the bullets I have the following code:

var used_transform = Transform3D();
var instance = RenderingServer.instance_create();
RenderingServer.instance_set_base(instance, bullet0_sprite);
RenderingServer.instance_set_scenario(instance, get_world_3d().scenario)
used_transform.origin = bullet.position;
RenderingServer.instance_set_transform(instance, used_transform);

When bullet0_sprite is set to a BoxMesh.new(), it renders fine. But I want to use a sprite3d like I have been. I tried several things including using a 2d texture, but I’m not sure what kind of resource ID to assign to bullet0_sprite really.

I’m not sure if Sprite3D is a special case or something. I’m new to Godot, btw, any help is appreciated, thanks!

Edit: I was able to recreate it using a plane mesh and material