How can I permanently fix a light at the side of game field?

Discussion in 'How Can I...?' started by Jagabum, Oct 3, 2015.

  1. Jagabum

    Jagabum Guest

    Joined:
    Sep 25, 2015
    Messages:
    25
    Likes Received:
    5
    How can I permanently fix a light at the side of game field please? When I place the light on the scene, it will move together with the background as it scrolls, i want it to be fixed at a spot even when the background scrolls.

    Thanks in advance!
     
  2. Jagabum

    Jagabum Guest

    Joined:
    Sep 25, 2015
    Messages:
    25
    Likes Received:
    5
    Oh just tried attaching it to the Char, it works! :D
     
  3. stevinz

    stevinz Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    169
    Likes Received:
    142
    If you want the light to stay in one place instead of move around a little with the character, it is also possible to attach a light to an invisible decoration that is set to move at the same speed as the game speed. It can be tricky to match the game speed, but it is possible.
     
    Jagabum likes this.
  4. Jagabum

    Jagabum Guest

    Joined:
    Sep 25, 2015
    Messages:
    25
    Likes Received:
    5
    that's worth a try! yeah can get tricky too since i'm looking at the game speed starting slow then gradually picking up speed and going pretty fast after a while
     
  5. stevinz

    stevinz Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    169
    Likes Received:
    142
    That does make it tricky. You could use logic transforms to speed up the object whenever the game speed is changed.

    Or

    Adjust the velocity drag whenever you change game speed. This will affect the speed of all fixed objects, but not your character. I have several games that use this trick. My game Swine Flu starts at a game speed of 40 and velocity drag of 12.5, then I change it to 80 and 25, 120 and 37.5, etc. This speeds up the game but does not affect your characters speed. And also allows any objects fixed at a certain speed to continue to stay locked at the game speed. Its confusing, but possible.
     
    Jagabum likes this.
  6. Jagabum

    Jagabum Guest

    Joined:
    Sep 25, 2015
    Messages:
    25
    Likes Received:
    5
    oh i get it! thanks much for the suggestion @stevinz!
     

Share This Page