Announcement

Collapse
No announcement yet.

Pawn Wall walking and directional gravity

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

    #61
    Yeah I'm definitely sticking with the flying physics, as the collision works. Anyway I've just found that if I leave it for a few seconds the hit is made out of the blue, the state changes to 'PlayerWalking' and I've got back control of the pawn.

    Its really strange, the NotifyHitWall doesn't get called for a good 2 or 3 seconds after I watch the pawn hit the floor.

    EDIT: Ah just found out why

    http://gearsforums.epicgames.com/sho...d.php?t=713491

    No idea what this variable is actually doing but setting it to 0 actually fixed it.

    EDIT 2: It appears to be the minimum dot product value of the HitNormal and the Actor's velocity

    Code:
    var	 float		MinHitWall;	// Minimum HitNormal dot Velocity.Normal to get a HitWall event from the physics

    Comment


      #62
      I use notifyhitwall on my ledging transfer movement and it works nicely on phys flying, yeah I set minhitwall, too

      Comment


        #63
        yeah that was what was causing the problem, the MinHitWall value. I'm now just stuck with slowing down the player. The PHYS_Walking took care of the deceleration of the pawn when the player is not holding down a movement button but with PHYS_Flying its like the player is running on ice.

        Comment


          #64
          You should set your velocity / acceleration :P
          I tried using acceleration for my movement but it was borky, so I just set acceleration to 0, and velocity to 0 at start, then if I pressed A or D on my ledges I set velocity to 200*movement vector and that worked nicely.

          Comment


            #65
            this is different though, the player will be walking on the surface not hanging from it, so it the player constantly walked at a fixed speed as soon as a button was pressed it wouldn't look too good. Thats why I'm trying to use the acceleration the only problem is PHYS_Walking handled the slowing down of the pawn after letting go of a button PHYS_Flying needs me to program it in and Im not sure how.

            Comment


              #66
              I see... maybe if movement buttons aren't pressed, you decelerate?
              And instead of ".acceleration = blehblah" just "velocity += bleh*bleh*deltaTime"

              Comment


                #67
                Originally posted by mwadelin
                Cool! I didn't know about this.

                Originally posted by mwadelin
                Thats why I'm trying to use the acceleration the only problem is PHYS_Walking handled the slowing down of the pawn after letting go of a button PHYS_Flying needs me to program it in and Im not sure how.
                There is no deceleration support for pawn physics. What I did for this case is set max acceleration and slowly decrease AirSpeed.

                Comment


                  #68
                  Ah ok, ill code that later as the flying animation is starting to annoy me so I want to make it run now. I made a copy of the AnimTree but upon editing the tree and attempting to save I get a warning telling me there are unlinked nodes and then when I try and reopen the tree it crashes.

                  Atm I'm deleting all the stuff after the 'Flying Node' where it connects to the flying input and then connecting that to the normal running stuff. I've even tried copying and pasting the running stuff to use as I tohught that might be making it crash but still no luck.

                  Comment


                    #69
                    Hey! we are working on this too!

                    http://www.youtube.com/watch?v=OIxzuBX2q_g

                    Comment


                      #70
                      wow I am impressed, what approach have you used for the wall climbing?

                      Comment


                        #71
                        Progress is going really slow with this again, I've gone back to trying to get the PHYS_Spider working again.
                        It works fine apart from the collision issues I'm having shown in this video:
                        http://www.youtube.com/watch?v=Q9dTbAn72FY

                        The collision is, 1 making it get stuck sometimes and 2 pushing the pawn too far away from the floor in some cases.

                        Comment


                          #72
                          Mhh, that's still strange.
                          Maybe trace downwards while moving to check if your collisionbox is too far away from the ground" then you could move the pawn closer there?

                          Comment


                            #73
                            Ive been trying a trace downwards (depending on the pawns rotation) and using SetLocation but it comes out with some undesired results.

                            With the PHYS_Spider its working fine with collision.... but only aslong as I dont rotate the pawn(and its collision mesh). As soon as I rotate the pawn to so that its feet are on the wall too the collision mesh starts getting stuck in things when it appears to not even be touching them.

                            Comment


                              #74
                              I always end up double posting lol

                              I've tried another way to get this working, I've disabled the collision cylinder completely and the skel mesh collision. The PHYS_Spider physics works well then but obviously without collision it just places the pawn at its centre point along the surface.

                              So I wrote this function to offset it away from the wall and put it inside the Tick event of the pawn.

                              Code:
                              /** Offsets the pawns location to make the feet be on the floor */
                              function OffsetPawnFromFloor()
                              {
                              	local Vector NewLoc;
                              
                              	if(Physics == PHYS_Spider)
                              	{
                              		NewLoc = Location;
                              		NewLoc -= FeetOffset * TransFormVectorByRotation(Rotation, Vect(0,0,-1));
                              
                              		SetLocation(NewLoc);
                              	}
                              }
                              In the tick function its done after everything else so hopefully the physics calculation will have already taken place

                              Code:
                              event Tick(float DeltaTime)
                              {
                              	super.Tick(DeltaTime);
                              
                              	OffsetPawnFromFloor(); // move pawn above floor (as no collision cylinder/mesh is being used)
                              }
                              But this isnt working. It appears that as soon as you use SetLocation while in PHYS_Spider, the Physics are changed straight to PHYS_Walking.

                              Any other ideas, really this is the only thing that is stopping this from working atm.

                              Comment


                                #75
                                http://chimeric.beyondunreal.com/tutorials/tut27.php
                                That`s a tutorial abou the PHSY_ states and i read it that way, that you would have to set it to PHYS_None, if you wish to use SetLocation()
                                How did you come this far by now anyways?

                                Comment

                                Working...
                                X