I want change the speed of an gameObject by touching the touchscreen. If a ball fall with this code, how can i do to change the speed of the ball for a period of time (1-2 sec)?
public float apeed = 1;
Jun 30 '12 at 12:17 PM
Jun 30 '12 at 12:02 PM
You need to modify the velocity of the rigidbody. If it happens once on touch, you can do it in Update. If it's continuous, do it in FixedUpdate.
Jun 30 '12 at 03:29 PM
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
The best place to ask and answer questions about development with Unity. Check out our FAQ for more information.
To help users post good questions and use the site effectively we have posted a tutorial video. Please check it out.
asked: Jun 30 '12 at 12:17 PM
Seen: 361 times
Last Updated: Jun 30 '12 at 03:29 PM
How do I have an EditorWindow save it's data inbetween opening and closing Unity? C#
sqlite in unity indie version C#
Generate BoxCollider with Rigidbody from c# script - how to?
C# Number to binary
Help converting this to C# - a few issues
Losing power up bool value
invoking an active coroutine
WaitForSeconds in C# outside of start or awake
Is it possible to use Windows Form Application to develope user interface in Unity?
launch unity within a c# shell?