Search Unity

Need help with ball rotation - JavaScript

Discussion in 'Scripting' started by georgesferguson, Jul 24, 2014.

  1. georgesferguson

    georgesferguson

    Joined:
    Jul 24, 2014
    Posts:
    3
    Hi guys,

    I'm completely new to programming in general. I have been following a tutorial and using code from some videos, as well as tweaking it on my own.

    I use this code to make a ball rotate right and left using the A and D keys;


    The issue is, no matter how much I increase the rotation speed, is doesn't actually make the ball go faster, only rotate in a circle faster. I think I need to increase the velocity but I don't know how. Please help!
     
  2. Fluzing

    Fluzing

    Joined:
    Apr 5, 2013
    Posts:
    815
    Rotation speed has nothing to do with velocity. You need to alter the movement speed.
     
  3. georgesferguson

    georgesferguson

    Joined:
    Jul 24, 2014
    Posts:
    3
    Great...How?
     
  4. Hunter_W

    Hunter_W

    Joined:
    May 5, 2014
    Posts:
    57
  5. georgesferguson

    georgesferguson

    Joined:
    Jul 24, 2014
    Posts:
    3
    Like I want the ball to move right to left faster
     
  6. Hunter_W

    Hunter_W

    Joined:
    May 5, 2014
    Posts:
    57
    Adjusting the multiplier should do it.
     
  7. Hunter_W

    Hunter_W

    Joined:
    May 5, 2014
    Posts:
    57