Create a main scene which has a child node Sprite that shows an image, a button that can hide image and button and show Spacial node when pressed.

Drag the 3D model file which is obj format to the spacial scene. Then we can get a new node that type is MeshInstance. Note: we will see nothing if no camera added to the Spacial scene.

main.gd:

extends Node2D

# Called when the node enters the scene tree for the first time.
func _ready():
	get_node("Spatial").visible = false
    
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	get_node("Spatial/arch").rotate( Vector3(1, 0, 0), 0.1 )

func _on_Button_pressed():
	get_node("Button").hide()
	get_node("Sprite").hide()
	get_node("Spatial").visible = true
Rotate3D
Categories: Godot

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments

Tex To PDF
: convert the Latex file which suffix is tex to a PDF file

X
0
Would love your thoughts, please comment.x
()
x