該樓層疑似違規已被系統折疊?隱藏此樓查看此樓
using UnityEngine;
using System.Collections;
unity怎么改變中心點,public class click : MonoBehaviour {
public float validTouchDistance = 200;
public string layerName;
public Texture2D rivers;
unity如何打開場景,// Use this for initialization
void Start () {
}
// Update is called once per frame
unity創建場景。void Update () {
if (Input.GetMouseButtonDown (0)) {
Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);
RaycastHit hitInfo;
unity怎么搭建場景、if (Physics.Raycast (ray, out hitInfo, validTouchDistance)) {
GameObject gameObj = hitInfo.collider.gameObject;
Vector3 hitPoint = hitInfo.point;
Vector2 coo = new Vector2 (10 * hitPoint.x + 2816, -10 * hitPoint.z + 1024);
unity坐標系、Vector4 terr = 255 * rivers.GetPixel (Mathf.RoundToInt (coo.x), Mathf.RoundToInt (coo.y));
print (gameObj.name + " " + coo.ToString () + " " + rivers.GetPixel (Mathf.RoundToInt (coo.x), Mathf.RoundToInt (coo.y)));
}
}
unity3d,}
}
一張5632x2048的圖,貼在56.32x20.48的平面上,只有兩種顏色,filter mode是point,很清晰,但是輸出結果卻完全是凌亂的,一種是(1,1,1,1)另一種是(0.478,0.478,0.478,0.478),可是完全不按照兩種顏色排布,出了什么錯么
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态