This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/Shader" { | |
Properties { | |
// Inspectorから入力される値 | |
_MaterialColor ("Color", Color) = (1,1,1,1) | |
_Sspec ("Specular Color", Color) = (1,1,1,1) | |
_Mgls ("Specular Index", Float) = 5 | |
} | |
SubShader { | |
Pass { | |
Tags { "LightMode" = "ForwardBase" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RayTest : MonoBehaviour { | |
public LayerMask mask; | |
void Ray() { | |
// 1. | |
// Rayの作成 | |
Ray ray = new Ray(transform.position, transform.forward); | |
Ray mouseRay = Camera.main.ScreenPointToRay(Input.mousePosition); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class RailTouchToMove : MonoBehaviour { | |
Transform touchRailTransform; | |
Vector3 dragOffset; | |
RaycastHit hit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class PlayerController : MonoBehaviour { | |
NavMeshAgent agent; | |
RaycastHit hit; | |
Ray ray; |