Changing the direction of gravity

Discussion in 'Mapping Questions & Discussion' started by Kraftwerk, Jun 20, 2010.

  1. Kraftwerk

    Kraftwerk L2: Junior Member

    Messages:
    86
    Positive Ratings:
    4
    Is there any way that the direction of gravity on the map can be changed midgame? Either that, or have different sections of the map with different directions of gravity? I know this probably isn't possible, but I have several ideas (for tf2 maps, and for other source maps) that would rely on this kind of thing.
     
  2. Mick-a-nator

    aa Mick-a-nator

    Messages:
    640
    Positive Ratings:
    314
    I think not. I believe it is hard coded into the engine to pull the player downwards. You could possibly create a func_push pushing the player upwards with the exact same force (not sure what value that is) and another, again with the same force, pushing in the direction you want the players to go. That probably is going to be quite buggy but if used in moderation could provide you with a fix.
     
    • Thanks Thanks x 1
  3. The Political Gamer

    aa The Political Gamer

    Messages:
    4,468
    Positive Ratings:
    1,682
    From what I remember its busted in TF2.
     
    • Thanks Thanks x 1
  4. Kraftwerk

    Kraftwerk L2: Junior Member

    Messages:
    86
    Positive Ratings:
    4
    That wouldn't quite work. It would need to completely re-orient the characters view, and they'd need to be able to move around like normal.
    Well...T hanks. I guess I'll just have to wait for source engine 2 to try any of this :p
     
  5. The Political Gamer

    aa The Political Gamer

    Messages:
    4,468
    Positive Ratings:
    1,682
    You could fake it by rotating the hole map!
     
    • Thanks Thanks x 1
  6. Kraftwerk

    Kraftwerk L2: Junior Member

    Messages:
    86
    Positive Ratings:
    4


    Actually. I may just have to experiment with this! How could I do that? (Like what entities?)
     
  7. Mick-a-nator

    aa Mick-a-nator

    Messages:
    640
    Positive Ratings:
    314
    woa woa woa... rotating the whole map on mid-game!? fine, but on you cpu be it... (I think TPG was joking)
     
  8. Kraftwerk

    Kraftwerk L2: Junior Member

    Messages:
    86
    Positive Ratings:
    4
    I feel thick now XD
     
  9. Mick-a-nator

    aa Mick-a-nator

    Messages:
    640
    Positive Ratings:
    314
    lol no worries, TPG does that all the time, and sarcasm doesn't work in writing.
     
    • Thanks Thanks x 1
  10. The Political Gamer

    aa The Political Gamer

    Messages:
    4,468
    Positive Ratings:
    1,682
    Woops, my bad I forgot the /sarcasm :E
     
  11. Mick-a-nator

    aa Mick-a-nator

    Messages:
    640
    Positive Ratings:
    314
    can you just put "/sarcasm" in your sig please? it would make things so much easier.

    Also, way to de-rail the thread TPG -_-
     
  12. Randdalf

    aa Randdalf

    Messages:
    1,054
    Positive Ratings:
    462
    Safe to say, no you couldn't do this in TF2, though there was this source mod that did something similar to this, but it was all custom coded.
     
    Last edited: Jun 20, 2010
  13. gcone81

    gcone81 L1: Registered

    Messages:
    37
    Positive Ratings:
    3
    I think the most you could do with gravity would be to make it pull players in the exact opposite direction. This way, they would be pulled upwards instead of downwards. This could be done by sending an sv_gravity command to the server with a negative value instead of a positive one.

    You could make it so there is absolutely no gravity by sending an sv_gravity command with a value of 0.
     
  14. megawac

    megawac L4: Comfortable Member

    Messages:
    180
    Positive Ratings:
    29
    I was thinking along those lines aswell gcone, but with a trigger_gravity encompassing areas/your entire map.

    Also you could probally fake it other directions by setting the gravity to 0 and using trigger_push enties.

    PS not sure if making it a negative value will make players land on their feet or stick to the ceiling.
     
    Last edited: Jun 24, 2010
  15. gcone81

    gcone81 L1: Registered

    Messages:
    37
    Positive Ratings:
    3
    I never thought of that but you're right; you could set the gravity to 0 and use the pushes to make it seem like its going in a different direction.

    I've tried negative gravity values before and, although it will pull the players upwards, they won't flip and have their feet on the skybox. They'll remain upright.