Godot, scripts para Godot estudios y aprendizajes, Creacion de videojuegos. Creacion y publicacion de videojuegos en internet. Como hacer videojuegos. C# unity. Animaciones unity blender. Personajes videojuegos graficos dibujos. Diseño grafico. Comic. Animaciones gif. Dibujo de retratos. Realidad virtual. Cine y realidad virtual.
domingo, 30 de octubre de 2022
sábado, 22 de octubre de 2022
wenster videojuego a la venta en itch.io;
jueves, 13 de octubre de 2022
Entrada especial para scripts en C# para Unity; para el canal nuevo de youtube;
Script en C# para girar un gameobject, ejemplo 
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------- 
 using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GIRAAUNO : MonoBehaviour
{
    // Use this for initialization
    void Start()
    {
        //transform.rotation = Quaternion.Euler (0,45, 0);
    }
    // Update is called once per frame
    void Update()
    {
        // Es la rotacion de Angulos de Euler en grados.
        //transform.Rotate (new Vector3 (0 * Time.deltaTime,0.4f, 0), Space.Self);////////originalllllll
        transform.Rotate(new Vector3(10 * Time.deltaTime, 0f, 0), Space.Self);////////MUY LENTOS BAN APARECIENDO
                                                                              //    transform.Rotate (new Vector3 (0 * Time.deltaTime,4.4f, 0), Space.Self);
    }
}
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
Script en C# para hacer subir un gameobject, ejemplo
--------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------- 
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MASARRIBAMAS : MonoBehaviour
{
    [SerializeField]
    private float fuerza;
    [SerializeField]
    private float aceleracion;
    private Rigidbody rb;
    // Start is called before the first frame update
    void Start()
    {
        rb = GetComponent<Rigidbody>();
    }
    // Update is called once per frame
    void Update()
    {
       // rb.AddForce(transform.forward * aceleracion, ForceMode.Acceleration);
        rb.AddForce(transform.up * aceleracion, ForceMode.Acceleration);
    }
}
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
Ejemplo de C# Unity de sript de borrar por paso de tiempo un gameobject
---------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine;
public class BORRAMIBALA : MonoBehaviour {
    public float Destroy = 2f;
    // Use this for initialization
    void Start () {
        
    }
    
    
    
    
    void OnCollisionEnter (){
        
        Destroy (gameObject, 3.30f); 
        
        
        
        
        
    }
}
------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
EJEMPLO DE CAMBIO DE ESCENA POR PASO DEL TIEMPO C# UNITY
------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
 using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;/// <summary>
public class ENVARIOSSEGUNDOSEMPIEZAELJUEGO : MonoBehaviour
{
    public Text contador1;
    public Text fin1;
    private float tiempo = 30f;
    // Use this for initialization
    void Start()
    {
        contador1.text = " " + tiempo;
        fin1.enabled = false;
    }
    // Update is called once per frame
    void Update()
    {
        tiempo -= Time.deltaTime;
        contador1.text = " " + tiempo.ToString("f0");
        if (tiempo <= 0)
        {
            contador1.text = "0";
            fin1.enabled = true;
            {
                //void OnTriggerEnter(Collider other) {
                //if (other.gameObject.CompareTag ("ogri2 (1)CAMPEONNNNNNNNNNNNNNNNNNN")){
                //    Destroy (gameObject, 0.0f); 
                {
                    //Application.LoadLevel (1); ESTE ES EL ORIGINALLLLLLL
                    Application.LoadLevel(1);
                }
            }
        }
    }
}
---------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------
--------SCRIPT C# ROTA UN GAMEOBJECT RECTANGULAR AL MANTENER PRESIONADO LA RUEDA CENTRAL DEL MOUSE----------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------- 
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class aspagiraapretarraton : MonoBehaviour
{
    // Use this for initialization
    void Start()
    {
        //transform.rotation = Quaternion.Euler (0,45, 0);
    }
    // Update is called once per frame
    void Update()
    {
        //void OnTriggerEnter(Collider other)
        {
            if (Input.GetButton("Fire3"))////// AMETRALLADORA AMETRAYADORA
            {
                // Es la rotacion de Angulos de Euler en grados.
                transform.Rotate(new Vector3(0 * Time.deltaTime, 0, 200), Space.Self);
            }
        }
    }
}
domingo, 9 de octubre de 2022
Como cambiar el eje de un gameobject con Unity 2022.1.12f1 con el Pivot y con Center; Para hacer una puerta giratoria; C#;
Me tirado varios meses para poder hacer una puerta giratoria y no recordaba como lo hacia antes por un problema de descentrar el eje del gameobject y ponerlo en un extremo; y lo e resuelto de casualidad, unas imagenes valen mas que 1000 palabras, asi que sin comentarios, a partir de aqui es muy sencillo hacer una puerta giratoria, ni script necesita, el player pasa y la puerta gira desde un extremo, no necesita nada mas en absoluto.
SCRIPTS EN C# QUE UTILIZO PARA HABRIR Y CERRAR LAS PUERTAS MEDIANTE UNA ANIMACION REALIZADA CON 2 DE ELLAS, SON PUERTAS GIRATORIAS Y UTILIZO 4 PUERTAS CON ESTOS 3 SCRIPTS CONSIGO SU FUNCIONAMIENTO CUANDO EL PLAYER CRUZA POR ELLAS....ESTE PARA LAS PUERTAS GIRATORIAS UN ESCRIPT PARA LA DE LA IZQUIERDA Y EL MISMO PARA LA DE LA DERECHA ARRASTRANDOLAS A SU CORRESPONDIENTE CASILLA QUE FABRICA EL SCRIPT.
 using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class activatTexto : MonoBehaviour
{
    public GameObject texto;
    private void OnTriggerEnter (Collider other)
    {
      if(other.tag == "Player")
        {
            texto.SetActive(true);
              
        }
    }
    private void OnTriggerExit(Collider other)
    {
        if (other.tag == "Player")
        {
            texto.SetActive(false);
        }
    }
}
-----------------------------------------------------------------------------------------------------------
ESTOS DOS PARA LAS PUERTAS CUANDO ESTAN CERRADAS.....
-------------------------------------------------------------------------------------------------------------
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BORRAPUERTASQUIETASALPASAR : MonoBehaviour
{
    public GameObject puertagiratoriadesdeblenderCINCO;
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Player")
        {
            puertagiratoriadesdeblenderCINCO.SetActive(false);
        }
    }
    private void OnTriggerExit(Collider other)/////imbento
    { 
                if (other.tag == "Player")///////imbento
             
        {
                 
                        puertagiratoriadesdeblenderCINCO.SetActive(true);
               
        }
}
}
     
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BORRAPUERTASQUITASALPASARLASEIS : MonoBehaviour
{
    public GameObject puertagiratoriadesdeblenderSEIS;
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Player")
        {
            puertagiratoriadesdeblenderSEIS.SetActive(false);
        }
    }
    private void OnTriggerExit(Collider other)/////imbento
    {
        if (other.tag == "Player")///////imbento
        {
            puertagiratoriadesdeblenderSEIS.SetActive(true);
        }
    }
}
miércoles, 5 de octubre de 2022
PC DEMO 9 WESTERN GAY by TOZUDO;
lunes, 3 de octubre de 2022
PC DEMO 8 WESTERN GAY by TOZUDO;
sábado, 1 de octubre de 2022
Unity script en C# rota un gameobject al presionar rueda central del raton o mouse;
 using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class aspagiraapretarraton : MonoBehaviour
{
    // Use this for initialization
    void Start()
    {
        //transform.rotation = Quaternion.Euler (0,45, 0);
    }
    // Update is called once per frame
    void Update()
    {
        //void OnTriggerEnter(Collider other)
        {
            if (Input.GetButton("Fire3"))////// AMETRALLADORA AMETRAYADORA
            {
                // Es la rotacion de Angulos de Euler en grados.
                transform.Rotate(new Vector3(0 * Time.deltaTime, 0, 200), Space.Self);
            }
        }
    }
}
 
 




