本文整理汇总了C#中Gesture.GetTouchToWordlPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Gesture.GetTouchToWordlPoint方法的具体用法?C# Gesture.GetTouchToWordlPoint怎么用?C# Gesture.GetTouchToWordlPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gesture
的用法示例。
在下文中一共展示了Gesture.GetTouchToWordlPoint方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: On_Swipe2Fingers
// during the swipe
void On_Swipe2Fingers(Gesture gesture){
if (trail!=null){
Vector3 position = gesture.GetTouchToWordlPoint(5);
trail.transform.position = position;
}
}
示例2: On_SwipeStart
private void On_SwipeStart(Gesture gesture)
{
if ((gesture.fingerIndex == 0) && (this.trail == null))
{
Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(5f, false);
this.trail = UnityEngine.Object.Instantiate(Resources.Load("Trail"), touchToWordlPoint, Quaternion.identity) as GameObject;
}
}
示例3: On_Swipe
private void On_Swipe(Gesture gesture)
{
if (this.trail != null)
{
Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(5f, false);
this.trail.transform.position = touchToWordlPoint;
}
}
示例4: On_Drag
// Drag Message => move
void On_Drag(Gesture gesture)
{
if (gesture.pickObject == gameObject){
Vector3 position = gesture.GetTouchToWordlPoint(8);
GetComponent<Rigidbody>().position = position - deltaPosition;
}
}
示例5: On_DragStart
private void On_DragStart(Gesture gesture)
{
if (gesture.touchCount == 1)
{
Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(1f, false);
this.deltaPosition = touchToWordlPoint - base.transform.position;
}
}
示例6: On_Drag
private void On_Drag(Gesture gesture)
{
if (gesture.pickObject == base.gameObject)
{
Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(8f, false);
base.rigidbody.position = touchToWordlPoint - this.deltaPosition;
}
}
示例7: On_DragStart
// Drag_Start
void On_DragStart(Gesture gesture)
{
if (gesture.pickObject == gameObject){
Vector3 position = gesture.GetTouchToWordlPoint(8);
deltaPosition = position - GetComponent<Rigidbody>().position;
GetComponent<Rigidbody>().constraints = RigidbodyConstraints.None;
}
}
示例8: On_DragStart
private void On_DragStart(Gesture gesture)
{
if (gesture.pickObject == base.gameObject)
{
base.gameObject.renderer.material.color = new Color(UnityEngine.Random.Range((float) 0f, (float) 1f), UnityEngine.Random.Range((float) 0f, (float) 1f), UnityEngine.Random.Range((float) 0f, (float) 1f));
Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(5f, false);
this.deltaPosition = touchToWordlPoint - base.transform.position;
}
}
示例9: On_DragStart
private void On_DragStart(Gesture gesture)
{
if (gesture.pickObject == base.gameObject)
{
Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(8f, false);
this.deltaPosition = touchToWordlPoint - base.rigidbody.position;
base.rigidbody.constraints = RigidbodyConstraints.None;
}
}
示例10: On_Swipe
// During the swipe
private void On_Swipe(Gesture gesture){
if (trail!=null){
// the world coordinate from touch for z=5
Vector3 position = gesture.GetTouchToWordlPoint(5);
trail.transform.position = position;
}
}
示例11: On_DragStart
// One finger drag
void On_DragStart( Gesture gesture){
// restricted when there is only one touch
if (gesture.touchCount==1){
// Calculate the delta position between touch and photo center position
Vector3 position = gesture.GetTouchToWordlPoint(1);
deltaPosition = position - transform.position;
}
}
示例12: On_Drag
private void On_Drag(Gesture gesture)
{
if (gesture.pickObject == base.gameObject)
{
Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(5f, false);
base.transform.position = touchToWordlPoint - this.deltaPosition;
this.textMesh.text = gesture.swipe.ToString() + " / angle :" + gesture.GetSwipeOrDragAngle().ToString("f2");
}
}
示例13: On_SwipeStart2Fingers
private void On_SwipeStart2Fingers(Gesture gesture)
{
if (this.trail == null)
{
Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(5f, false);
this.trail = UnityEngine.Object.Instantiate(Resources.Load("Trail"), touchToWordlPoint, Quaternion.identity) as GameObject;
EasyTouch.SetEnableTwist(false);
EasyTouch.SetEnablePinch(false);
}
}
示例14: On_SwipeStart
// At the swipe beginning
private void On_SwipeStart( Gesture gesture){
// Only for the first finger
if (gesture.fingerIndex==0 && trail==null){
// the world coordinate from touch for z=5
Vector3 position = gesture.GetTouchToWordlPoint(5);
trail = Instantiate( Resources.Load("Trail"),position,Quaternion.identity) as GameObject;
}
}
示例15: On_DragStart2Fingers
// At the drag beginning
void On_DragStart2Fingers(Gesture gesture){
// Verification that the action on the object
if (gesture.pickObject == gameObject){
gameObject.renderer.material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
Vector3 position = gesture.GetTouchToWordlPoint( 5);
deltaPosition = position - transform.position;
}
}