Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

panning script c# on phone

#pragma strict

// The target gameObject.
var target: Transform;

// Speed in units per sec.
var speedLeft: float = -10;

private static var isPanLeft = false;


function FixedUpdate()
{
if(isPanLeft == true)
{
    // The step size is equal to speed times frame time.
    var step = speedLeft * Time.deltaTime;

    // Move model position a step closer to the target.
    transform.position = Vector3.MoveTowards(transform.position, target.position, step);
}
}

static function doPanLeft()
{
    isPanLeft = !isPanLeft;
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: Mirror Inverse Program in c# 
Csharp :: unity rotatoin angle 
Csharp :: .net entities query multiple join condition 
Csharp :: sqldatareader get row count 
Csharp :: Conditional IQueryable Linq extension 
Csharp :: ow-to-return-http-500-from-asp-net-core-rc2-web-api 
Csharp :: nunit return parameter 
Csharp :: wcf service dependency injection 
Csharp :: c# get digits from int 
Csharp :: remove tag anchor and inside tag from html raw text c# 
Csharp :: attribute c# get method name reflection 
Csharp :: Acrylic UWP Title bar C# 
Csharp :: texture matrix 
Csharp :: unity async await 
Csharp :: c# enum to string 
Csharp :: c# Add or Concatenate Strings In C# 
Csharp :: unity iOS app rating widget 
Csharp :: unity on key press 
Csharp :: c# optional parameters using 
Csharp :: what does - in f#? 
Csharp :: unity input tastiera 
Csharp :: call action method on checkbox click asp.net mvc without pageload 
Html :: html meta redirect 
Html :: open link in new tab 
Html :: materialize cdn 
Html :: disable html form input autocomplete autofill 
Html :: lien dans un nouvel onglet html 
Html :: prevent copying text in html 
Html :: input suggestion off 
Html :: meta redirect header 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =