Wikipédia de RayMind
Formations & Tutos : Différence entre versions
(→Script principal GrabAndDrop.cs du tutoriel) |
|||
| Ligne 73 : | Ligne 73 : | ||
== Animation == | == Animation == | ||
| + | === Liens vers les tutoriaux === | ||
[https://unity3d.com/fr/learn/tutorials/topics/animation Tutoriel d'animation (https://unity3d.com/fr/learn/tutorials/topics/animation)]<br /> | [https://unity3d.com/fr/learn/tutorials/topics/animation Tutoriel d'animation (https://unity3d.com/fr/learn/tutorials/topics/animation)]<br /> | ||
[https://www.youtube.com/watch?v=uhlRoV_msPc Tutoriel de porte qui s'ouvre et se ferme en fonction qu'on s'en approche ou non (https://www.youtube.com/watch?v=uhlRoV_msPc)]<br /> | [https://www.youtube.com/watch?v=uhlRoV_msPc Tutoriel de porte qui s'ouvre et se ferme en fonction qu'on s'en approche ou non (https://www.youtube.com/watch?v=uhlRoV_msPc)]<br /> | ||
| Ligne 85 : | Ligne 86 : | ||
== Mesh == | == Mesh == | ||
| + | === Lien vers le tutoriel === | ||
[http://answers.unity3d.com/questions/14567/editing-mesh-vertices-in-unity.html Edition de Mesh directement dans Unity] | [http://answers.unity3d.com/questions/14567/editing-mesh-vertices-in-unity.html Edition de Mesh directement dans Unity] | ||
| + | == Pathfinding == | ||
| + | === Liens vers les tutoriaux === | ||
| + | [https://www.youtube.com/watch?v=-L-WgKMFuhE&feature=youtu.be&list=PLFt_AvWsXl0cq5Umv3pMC9SPnKjfp9eGW A* Pathfinding (E01: algorithm explanation)]<br /> | ||
| + | [https://www.youtube.com/watch?v=nhiFx28e7JY A* Pathfinding (E02: node grid)]<br /> | ||
| + | [https://www.youtube.com/watch?v=mZfyt03LDH4 A* Pathfinding (E03: algorithm implementation)]<br /> | ||
| + | [https://www.youtube.com/watch?v=3Dw5d7PlcTM A* Pathfinding (E04: heap optimization)]<br /> | ||
| + | [https://www.youtube.com/watch?v=dn1XRIaROM4 A* Pathfinding (E05: units)]<br /> | ||
| + | [https://www.youtube.com/watch?v=T0Qv4-KkAUo A* Pathfinding (E06: weights)]<br /> | ||
| + | [https://www.youtube.com/watch?v=Tb-rM3wGwv4 A* Pathfinding (E07: smooth weights)] | ||
Version du 14 janvier 2017 à 01:36
Contenus et liens de formations et Tutos :
Grap & Drop d'objets
Lien vers le tutoriel
Tutoriel expliquant comment développer un script permettant d'attraper un objet avec la souris et le lâcher pour qu'il tombe sur le sol.
Vidéo d'explication du grap & drop d'objets (https://www.youtube.com/watch?v=jOOdJZS987Y)
Script principal GrabAndDrop.cs du tutoriel
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class GrabAndDrop : MonoBehaviour {
GameObject grabbedObject;
float grabbedObjectSize;
void Start() {
}
GameObject GetMouseHoverObject (float range)
{
Vector3 position = gameObject.transform.position;
RaycastHit raycastHit;
Vector3 target = position + Camera.main.transform.forward * range;
if (Physics.Linecast(position, target, out raycastHit))
return raycastHit.collider.gameObject;
return null;
}
void TryGrabObject (GameObject grabObject)
{
if (grabObject == Null || !CanGrab(grabObject))
return;
grabbedObject = grabObject;
grabbedObjectSize = grabObject.renderer.bounds.size.magnitude;
}
bool CanGrab(GameObject candidate)
{
return candidate.GetComponent<RigidBody>() != null;
}
void DropObject ()
{
if (grabbedObject == null)
return;
if (grabbedObject.GetComponent<RigidBody>() != null)
grabbedObject.GetComponent<RigidBody>().velocity = Vector3.zero;
grabbedObject = null;
}
void Update ()
{
Debug.Log (GetMouseHoverObject(5));
if (Input.GetMouseButtonDown(1)) {
if (grabbedObject == null)
TryGrabObject(GetMouseHoverObject(5));
else
DropObject();
}
if (grabbedObject != null) {
Vector3 newPosition = gameObject.transform.position + Camera.main.transform.forward * grabbedObjectSize;
grabbedObject.transform.position = newPosition;
}
}
}
Animation
Liens vers les tutoriaux
Tutoriel d'animation (https://unity3d.com/fr/learn/tutorials/topics/animation)
Tutoriel de porte qui s'ouvre et se ferme en fonction qu'on s'en approche ou non (https://www.youtube.com/watch?v=uhlRoV_msPc)
Autre tutoriel d'ouverture de porte mais cette fois elle est animée (https://www.youtube.com/watch?v=E9rLA-gt5Ss)
Hover Car avec sons (https://unity3d.com/fr/learn/tutorials/modules/beginner/live-training-archive/hover-car-physics?playlist=17120)
Arme animée avec Animator (https://www.youtube.com/watch?v=aJOH0Jlo4YA)
Animation d'un personnage (https://www.youtube.com/watch?v=wdOk5QXYC6Y)
La suite avec déplacement en vue 3ème personne (https://www.youtube.com/watch?v=7NktwerZFro)
Sabre laser (https://www.youtube.com/watch?v=ZT8eutqzW5A)
Déplacement relatif dans une animation - Root motion (https://unity3d.com/fr/learn/tutorials/topics/animation/authoring-root-motion)
Tutoriel animation Mecanim avancé (à voir avec ce forum ici)
Mesh
Lien vers le tutoriel
Edition de Mesh directement dans Unity
Pathfinding
Liens vers les tutoriaux
A* Pathfinding (E01: algorithm explanation)
A* Pathfinding (E02: node grid)
A* Pathfinding (E03: algorithm implementation)
A* Pathfinding (E04: heap optimization)
A* Pathfinding (E05: units)
A* Pathfinding (E06: weights)
A* Pathfinding (E07: smooth weights)