constant ball escape

Discussion in 'JavaScript' started by kadi, Apr 1, 2014.

  1. #1
    http://jsfiddle.net/mF7H5/

    here is the fiddle on what i am trying to do. i want to make one ball on the circle that is constant in position i.e., not spinning. the main aim is to escape constant ball(by assigning a button to jump) from the main ball. if the main ball which is rotating from my fiddle touches any of the constant ball then it should end. one point for each ball escape. i cant position a constant ball on the circle.
     
    kadi, Apr 1, 2014 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    I'm not 100% sure I'm deciphering your Engrish properly, since your fiddle doesn't seem to actually do anything... but if I were to take a wild guess -- you are attempting to rotate the outer element not the inner one? Or is there a element we're not seeing you are going to have fixed?

    IF I'm guessing right (big IF) as to what you are asking, there are two ways you could handle it. Position the 'fixed' element over the one you are rotating, so it LOOKS like they're connected when they aren't... or if you 'must' have it inside the same container, apply a negative rotation equal to your positive one.

    Though really, I'm not even sure what it was you're actually asking or trying to do with that code. Especially since you didn't even actually include the animation itself. You REFER to it, but didn't include it.

    Also, starts to look like more of a job for CANVAS than an IMG tag and CSS3... though really, you don't have any JS in your fiddle nor is this really a JS topic.... so is this really the right forum area for this?
     
    deathshadow, Apr 2, 2014 IP