- Home /
iTween - Is iTween continuous motion possible when a key is held down?
Hi there,
I was wondering if it's possible to, say if you're holding a key down (Input.GetKey("d")) to have an object Tween continuously while the key is held down?
At the moment, it seems to save all the motion up while the key is held down...then sends the gameObject on its way when the key is released!
E.g.
var xPosition = 0; var zPosition = 0;
function update () {
if(Input.GetKey("d")) { xPosition += 1; zPosition = zPosition;
iTween.MoveTo(gameObject, Vector3( xPosition, 0, zPosition),1); } }
I hope this is clear enough and I've also tried all of iTween's MoveTo, MoveBy, MoveAdd, MoveUpdate etc.
Many thanks in advance to any help!
Your answer
Follow this Question
Related Questions
Can iTween be used to constrain motion for an arbitrarily drawn curve? 1 Answer
Could use some help with precision UV Tween algorithm 1 Answer
Custom Easing Types using Curves for Motion? 3 Answers
iTweenPath Issues in windows? 1 Answer
iTween scaling animation childed to hte camera in a FPS game... 0 Answers