Announcement

Collapse
No announcement yet.

That Gravity Problem again...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    That Gravity Problem again...

    Hi all, I'm having major trouble altering the apparent gravity in a level.

    The intent is that the player floats into an area which is in zero G, and then activates a trigger to switch the "gravity generator" on causing the player and various bits and bobs of physics objects to fall to the floor.
    (there's more than this, but it's an illustrative problem)

    So far every approach we've tried has foundered somwhere or other along the way.

    So, a couple of questions if I may.

    1) Is it possible to switch a gravity volume on/off ?
    2) Do _any_ of the physics volume types (physics volume, water volume etc) affect objects other than pawns ?
    3) any other advice for fiddling with "Gravity" in unreal ?

    Many thanks.

    #2
    I think your problem is that you are trying to change value of STATIC gravity volume, because there is no dynamic gravity volume. But not all is lost, there is dynamic physics volume that lets you push objects.

    So place your zero gravity volume in level, set its priority low.
    Then place DYNAMIC physics volume and set its priority higher than gravity volume.
    Turn on dynamic physics volume from kismet, and to fake acceleration by slowly raising Z velocity vector of that volume.

    If KACTORS are not affected by dynamic physics volume (they were not in UT3, not sure about UDK) you can push them down with one of NX...Forcefield actors (for eg. NxGenericForceFieldBox).

    Comment


      #3
      I think a better solution would be to quickly create a bStatic = false gravity volume in script.

      Comment


        #4
        Originally posted by Nawrot View Post
        So place your zero gravity volume in level, set its priority low.
        Then place DYNAMIC physics volume and set its priority higher than gravity volume.
        Turn on dynamic physics volume from kismet, and to fake acceleration by slowly raising Z velocity vector of that volume.
        We've managed to fake it this far using a water volume,
        (alas the physics volume doesn't take effect if the player is standing on the floor so any gravity changes are only apparent when you jump)

        Originally posted by Nawrot View Post
        If KACTORS are not affected by dynamic physics volume (they were not in UT3, not sure about UDK) you can push them down with one of NX...Forcefield actors (for eg. NxGenericForceFieldBox).
        The forcefield seems to do the job of moving the Kactors (not the player though) but oncemore we can't seem to switch it on or off via kismet events and toggles.

        Are we missing some fundamnetal concept here ?

        Comment


          #5
          it is possible to fake it with space/water volumes so you're on the right track, however tbh the only way your going to do it is create your own Dynamic water/space vol in uscript. unless of course kismet will let you turn the volume on/off (and have a lower friction/grav value valume ontop of the other, so enable one disable the other). honestly its looking like you'll need a custom vol tho

          Comment


            #6
            ambershee gave the answer to this issue..

            Comment


              #7
              Originally posted by ambershee View Post
              I think a better solution would be to quickly create a bStatic = false gravity volume in script.
              Rah!
              This allows me to turn Gravity volumes on/off. Excellent.

              Not quite a complete solution yet but it's getting there.

              Problems still.
              The player doesn't notice the new gravity state until he jumps. So I'll have to poke him somehow

              RigidBody actors respond very oddly to anti gravity volumes:
              If they're busy falling when the change happens they fall upwards, hit the ceiling, fall downwards and never respond to the gravity volume again.
              If they're on the floor they don't respond to the gravity volume at all.

              Comment


                #8
                I think you have to set your pawn to PHYS_Falling after switching gravity on.

                Comment


                  #9
                  Originally posted by eAlex79 View Post
                  I think you have to set your pawn to PHYS_Falling after switching gravity on.
                  Excellent, this works a treat!

                  Comment


                    #10
                    Originally posted by DukeEuphoria View Post
                    If they're busy falling when the change happens they fall upwards, hit the ceiling, fall downwards and never respond to the gravity volume again.
                    I observed a similar issue in UT3 with zero gravity - but this behaviour only happened in the editor. See if it behaves as expected in the game?

                    Originally posted by DukeEuphoria View Post
                    If they're on the floor they don't respond to the gravity volume at all.
                    I'd assume they've been put in the 'sleeping' state and are no longer being calculated, because the physics engine is assuming they are at rest.

                    Comment


                      #11
                      Originally posted by ambershee View Post
                      I observed a similar issue in UT3 with zero gravity - but this behaviour only happened in the editor. See if it behaves as expected in the game?
                      Worth a try!

                      Originally posted by ambershee View Post
                      I'd assume they've been put in the 'sleeping' state and are no longer being calculated, because the physics engine is assuming they are at rest.
                      Even if I wake them up again with a well placed bullet they just fall as though the gravity volume wasn't there.
                      Most perplexing.

                      Comment


                        #12
                        i am currently having this problem
                        my guy floats around, only after i make him move or jump
                        as soon as he hits floor, the effect stops

                        Comment


                          #13
                          If a pawn hits the floor, it will begin to walk on that surface; this is unrelated to the other issues in this thread and is inherent with the "falling" behaviour of the pawn.

                          Comment


                            #14
                            This is how I did it... Since the physics volume needs triggered by the jump command, just call jump

                            Add this to your custom player controller:

                            exec function StartJump() {
                            PlayerInput.Jump();
                            }

                            Within kismet, add a new physics volume action of touch that calls your the StartJump command (add action : misc : console command)

                            voila.

                            Comment

                            Working...
                            X