viernes, 8 de diciembre de 2023

Borrar por script en godot3d version4.2;




Estos ejercicios de scrpt me han dado resultado y e conseguido que un cubo partiendo de base de un nodo Area3d al colisionar con otro se borre del juego al ejecutarse.......



------------------------------------------------------------------------------------------


extends Area3D



# Called when the node enters the scene tree for the first time.

func _ready():

pass # Replace with function body.




func _on_area_entered(area):

queue_free()

pass # Replace with function body.








---------------------------------------------------------------------------------------------------












extends Area3D


# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.



func _on_area_entered(area):
queue_free()
pass # Replace with function body.
func _process(delta):

scale.y*=1.55

pass






-----------------------------------------------------------------------------------------------


extends Area3D


# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.



func _on_area_entered(area):
queue_free()
pass # Replace with function body.
func _process(delta):

#scale.y*=1.55
translate(Vector3(0,0.02,0))
pass




---------------------------------------------------------------------------------------------------------------



extends Area3D


# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.



func _on_area_entered(area):
queue_free()
pass # Replace with function body.
func _process(delta):

#scale.y*=1.55
translate(Vector3(0,0.001,0))
pass










Escala un cubo para Godot4.2;

 extends RigidBody3D



# Called when the node enters the scene tree for the first time.

func _ready():

pass # Replace with function body.



# Called every frame. 'delta' is the elapsed time since the previous frame.

func _process(delta):

scale.y*=1.55

pass


Da un tipo de impulso hacia arriba en un cubo script para Godot3d 4.2;

 extends RigidBody3D



# Called when the node enters the scene tree for the first time.

func _ready():

pass # Replace with function body.



# Called every frame. 'delta' is the elapsed time since the previous frame.

#func _process(delta):

#translate(Vector3(0,0.08,0))

#pass



func _process(delta):

apply_torque_impulse(Vector3(0,0.08,0))

pass


Sube un cubo lentamente en Gdscript para godot 4.2;

extends RigidBody3D



# Called when the node enters the scene tree for the first time.

func _ready():

pass # Replace with function body.



# Called every frame. 'delta' is the elapsed time since the previous frame.

func _process(delta):

translate(Vector3(0,0.08,0))

pass


Rota cubo en eje "y" a velocidad 44 en godot 4.2 con Gdscript;

 extends RigidBody3D



# Called when the node enters the scene tree for the first time.

func _ready():

pass # Replace with function body.



# Called every frame. 'delta' is the elapsed time since the previous frame.

func _process(delta):

rotate_y(44)

pass


Demo de videojuego echo en Godot3d version de Godot 4.2;

 Demo de juego echo en Godot version 4.2

Esta echo para windows  se tiene que descargar ....intentaba hacerlo para html5 pero no tengo conocimientos para hacerlo, en fin en windows funciona de maravilla...








jueves, 7 de diciembre de 2023

Como modelar y hacer fisicas de colision en Godot 4.2 una forma.;

 En el video pongo una forma de modelar cubos en godot para hacer paredes o columnas obstaculos, y como mas o menos consigo que tenga colisiones que probocan fisicas de derrumbe, hay que seguir el orden que se ve en el video, primero un RigidBody3D3 y de hijo del RigidBody3D3 un CSGBox3D y otro hijo partiendo tambien del RigidBody3D3 un CollisionShape3D, mirar el video y practicar, cuesta hacer figuras simples y encajar los diferentes elementos que hacen fisicas, te sale una advertencia continuamente de que que tienes que ampliarlo todo proporcinalmente, si no, no sirve, una curisidad del proyectil que dispara, esque es una animacion activada por script, no es un proyectil instanciado por script, no consigo hacerlo, tengo que estudiar y practicar mucho mas aun, pero funciona, algun juegecillo simple se puede hacer con estos pocos conocimientos........