|
Hi folks! I'v a function than create a sphere over a plane on the hitpoint of the mouse cursor when I press the left button of the mouse. I want to make the object growing while the mouse button is pressend, and stop growing when I release the mouse. I'm trying to do that with Input.GetMouseButtonUp and Down without success :( Here is my actual code
Tnx!!
(comments are locked)
|
|
A few things, you'll probably want something more like:
And you'll want this to happen over course of many calls to Update:
GetMouseButtonUp and GetMouseButtonDown only get called once.. just on the frames those events take place. You probably want to define a 'speed' so you can adjust that var speed = .5; drop.transform.localScale += Vector3(Time.deltaTime, Time.deltaTime, Time.deltaTime) * speed;
Mar 21 '11 at 03:33 PM
DaveA
(comments are locked)
|

Hi, tnx for the reply :) Maybe I'm not explained exactly.
This is the list of operations I need to perform: