Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Mensajes - Gastonspas

#31
General (Antiguo) / Problema con ruedas
Enero 07, 2018, 03:13:52 AM
Cita de: leocub58 date=1515280677Es por el objeto padre, mete las ruedas en un GameObject vacío
   


Como vendría ah ser
#32
General (Antiguo) / Problema con ruedas
Enero 06, 2018, 10:25:34 PM
Hola muy buenas a todos tengo un problema con las ruedas no se por que hacen eso (imagen abajo)
 
 
 

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
[System.Serializable]
public class AxleInfo {
public WheelCollider leftWheel;
public WheelCollider rightWheel;
public bool motor;
public bool steering;
}
public class SimpleCarControler : MonoBehaviour {
public List<AxleInfo> axleInfos;
public float maxMotorTorque;
public float maxSteeringAngle;
// finds the corresponding visual wheel
// correctly applies the transform
public void ApplyLocalPositionToVisuals(WheelCollider collider)
{
   if (collider.transform.childCount == 0) {
      return;
   }
   Transform visualWheel = collider.transform.GetChild(0);
   Vector3 position;
   Quaternion rotation;
   collider.GetWorldPose(out position, out rotation);
   visualWheel.transform.position = position;
   visualWheel.transform.rotation = rotation;
}
public void FixedUpdate()
{
   float motor = maxMotorTorque * Input.GetAxis("Vertical");
   float steering = maxSteeringAngle * Input.GetAxis("Horizontal");
   foreach (AxleInfo axleInfo in axleInfos) {
      if (axleInfo.steering) {
         axleInfo.leftWheel.steerAngle = steering;
         axleInfo.rightWheel.steerAngle = steering;
      }
      if (axleInfo.motor) {
         axleInfo.leftWheel.motorTorque = motor;
         axleInfo.rightWheel.motorTorque = motor;
      }
      ApplyLocalPositionToVisuals(axleInfo.leftWheel);
      ApplyLocalPositionToVisuals(axleInfo.rightWheel);
   }
}
}

 
 
 

#33
General (Antiguo) / Mostrar fps reales
Agosto 25, 2017, 01:06:04 AM
Hola disculpen la molestia pero alguno sabe por que en unity cuando pongo "stats" me aparece ej : 100fps y en el script cuando mando a mostrar en pantalla aparece 60 ?
 
Alguno sabe por que. Muchas gracias por leer espero su respuesta.
 

var updateInterval = 0.1;
 
private var accum = 0.0;
private var frames = ;
private var timeleft : float;
var uifps : UI.Text;
 
function Start()
{
    timeleft = updateInterval;  
}
 
function Update()
{
    timeleft -= Time.deltaTime;
    accum += Time.timeScale/Time.deltaTime;
    ++frames;
    if( timeleft <= 0.0 )
    {
        uifps.text = "FPS : " + (accum/frames).ToString("f2");
        timeleft = updateInterval;
        accum = 0.0;
        frames = ;
    }
}

 
 
#34
General (Antiguo) / Escape The From Dead
Agosto 23, 2017, 06:06:51 PM
Gracias por los consejos ahora voy a implementarlos
#35
General (Antiguo) / Escape The From Dead
Agosto 23, 2017, 03:37:50 AM
Error mio al escribir optimizarlo
#36
General (Antiguo) / Escape The From Dead
Agosto 23, 2017, 02:45:23 AM
Gracias por los consejos, tenes alguna idea de como actulizarlo eh probado de todo
#37
General (Antiguo) / Escape The From Dead
Agosto 22, 2017, 12:53:19 AM
Muy buenas a todos, les queria comentar que eh estado trabajando en un proyecto que finalmente eh logrado llegar a una version jugable, la  verdad que me tomo tiempo pero tuve un colaborador que se ah encargo del modelaje y texturizado.
 
Espero que les guste el juego es para Windows 64 - 32 bits :
 
http://gastontutos.blogspot.com.ar/2017/08/escape-from-dead.html
 
Gracias por leer. Saludos
 
#38
General (Antiguo) / Dectectar Precion de tecla
Agosto 16, 2017, 06:11:07 PM
Hola muy buenas tengo una dudad como puedo hacer para detectar si preciosa cualquier tecla del teclado, se como detectar cuando preciona una tecla en especifico, pero yo quiero detectar cuando preciona cualquier tecla.
 
 
 
Gracias por leer, espero tu respuesta. Saludos
#39
General (Antiguo) / Dectectar collision
Agosto 04, 2017, 05:39:31 AM
Hola gente disculpen las molestias pero quisiera saber por que no dectecta la collision de cada objecto dejo un video para mostrar mejor
 


   
eature=oembed" width="480">

 
 
 

function OnTriggerEnter(other : Collider)
{
if (other.gameObject.tag == "ru_men_die")
{
   cualsera = 1;
   Debug.Log(cualsera);
}
if (other.gameObject.tag == "ru_mas_die")
{
   cualsera = ;
   Debug.Log(cualsera);
}
if (other.gameObject.tag == "ru_x2")
{
   cualsera = 2;
   Debug.Log(cualsera);
}
if (other.gameObject.tag == "ru_balas")
{
   cualsera = 3;
   Debug.Log(cualsera);
}
if (other.gameObject.tag == "Player")
{
   cualsera = 4;
   Debug.Log(cualsera);
}
}

 
 
#40
General (Antiguo) / NavMesh Detener objecto
Julio 31, 2017, 08:05:32 AM
Cita de: GSG3D date=1501249969Si quieres que frene en seco setea la posicion destino con la misma posicion que el agent, supongo.
   


Recien me volvio el internet y pude verlo muchas gracias lo probe y funciona perfecto.
#41
General (Antiguo) / NavMesh Detener objecto
Julio 28, 2017, 08:21:22 AM
Cita de: GSG3D date=1501220591usando la funcion Stop(), no?
   


La funcion es obsoleta y la remplaze igual la probe y tampoco frena de en seco frena de en 2 segundos y yo quiero que frene en nada
 

GetComponent.<UnityEngine.AI.NavMeshAgent>().isStopped = true;

 
aun no frena como corresponde
 

#pragma strict
var objectivo : Transform;
var stop = ;
function Start () {
var Angulo = Quaternion.LookRotation(objectivo.position - transform.position, Vector3.up);
GetComponent.<UnityEngine.AI.NavMeshAgent>().destination = objectivo.position;
    GetComponent.<UnityEngine.AI.NavMeshAgent>().speed = 6;
    GetComponent.<UnityEngine.AI.NavMeshAgent>().acceleration = 2;
    transform.rotation = Quaternion.Slerp(transform.rotation, Angulo, Time.deltaTime * 1);
}
function Update () {
if (stop)
{
   GetComponent.<UnityEngine.AI.NavMeshAgent>().isStopped = true;
}
else
{
   GetComponent.<UnityEngine.AI.NavMeshAgent>().isStopped = false;
}
}

 
https://www.youtube.com/watch?v=smHIvQmqZcg&feature=youtu.be
 
perdonen por el brillo
#42
General (Antiguo) / NavMesh Detener objecto
Julio 28, 2017, 06:31:59 AM
yo lo tengo asi el navmesh
#43
General (Antiguo) / NavMesh Detener objecto
Julio 28, 2017, 05:13:25 AM
como hago para que un objecto que usa navmesh frene de golpe, lo tengo así en el code pero tarde en frenar a 0
 

 GetComponent.&lt;UnityEngine.AI.NavMeshAgent&gt;().speed = 0;
#44
General (Antiguo) / Una duda en unity
Julio 12, 2017, 11:31:55 AM
los colliders y light perdon me olvide
#45
General (Antiguo) / Una duda en unity
Julio 12, 2017, 07:13:36 AM
Una consulta esto afecta el rendimiento del juego por que tengo pobreza de fps