No announcement yet.

Pawn Wall walking and directional gravity

  • Filter
  • Time
  • Show
Clear All
new posts

    again thanks guys, ill give this a go when im at the pc again


      I've given the static mesh cylinder is own collision now and added that line of code to remove the old collision but its still not working as I'd like. Have a look at this video:

      Is it using the skeletal mesh's collision instead? And also sometimes it appears to ignore this other collision and use my cylinder instead.

      Any more ideas?


        Well I'm just guessing now but it looks to me like the problem occurs when you hit the wall sideways and than turn the player, so I think the spider physics don't check for collision between the player and the surface he is walking on. I'm not sure how you would fix that though, if you used rigid body physics on the player this problem would probably be solved, but I've been told its quite a pain to do that.


          Yeah im struggling to understand what its doing here. I want no other collision but the cylinder ive made.


            Right, even after making a oversized collision cylinder static mesh it would appear that the spider physics doesn't use the static mesh at all, at the point of switching from one surface to another. If only I could get hold of the native code. I think this means that the spider stuff is going to be scrapped, I'm gonna have to code it myself.


              What a shame, I thought it would be possible in Unreal Engine 3.

              Why do the collision static mesh rotate slowly? Maybe if you rotate it harshly before the spider physics are set it may work.


                I'm sure it is possible, but without licensee access to the native code I'm not going to be able to figure out how and when the spider physics decides to change the Pawn.Floor variable. As it is at that point you need check the pawns collision component to move the pawn above the floor.

                Oh it rotates slowly because I'm lerping it, but even without the lerp it does the same thing just instantly.

                I've been meaning to ask you by the way; I know your way of doing it uses another physics setting to do the wall walking in the sonic GDK you're making. Can you point me in the right direction of how you achieved this?

                EDIT: P.S I've been trying to get into your .U package to sneak a peak at the code to no success lol



                  I use flying physics with 2 non-zero extent traces to check for wall/ceiling blocking collision, also I shrink the collision cylinder so that height is equal to radius -or you could try and use your static mesh.


                    I noticed the collision cylinder shrinking on during runtime. The thing I don't know how to do is make the pawn run along the wall / stick to it using the Flying Physics. The only way I know to make the pawn play the running animation is to use PHYS_Walking or PHYS_Spider.


                      The pawn doesn't really stick to wall; use HitNormal of a trace against the wall as you used Floor before and just experiment in Tick() with Velocity, SetLocation and SetRotation according to it.

                      To play the running animation with PHYS_Flying you have to modify the animation tree associated to the skeletal mesh.


                        As usual you've been a great help, I'll have a mess about with this later, thanks again.


                          Its been a while but I decided to take another look at this today. I'm having trouble registering a hit with the floor/wall when using the flying physics.

                          I'm using that static mesh collision that works well now that I'm not using spider physics. I'm using the flying physics for the walking but I'm also using it for the falling too as the falling physics (PHYS_Falling) only lets you fall in the world z axis, no good for my direcitonal gravity.

                          The problem I have is when the player falls to the floor and hits it the NotifyHitWall event doesnt get called and I cant for the life of me work out why. I'm using it switch the PlayerController's state from 'PlayerFalling' to 'PlayerWalking'.

                          Like so:
                          // when the pawn lands goback to player walking
                          event bool NotifyHitWall(vector HitNormal, actor Wall)
                          	return true;
                          Does anyone know why?


                            Landed is called when you hit a floor


                              That wont work...
                              /* epic ===============================================
                              * ::NotifyLanded
                              * Called when our pawn has landed from a fall, return
                              * true to prevent Landed() notification on the pawn.
                              * =====================================================
                              event bool NotifyLanded(vector HitNormal, Actor FloorActor);
                              That event is only triggered when the pawn hits its floor and "lands" whilst the physics is in PHYS_Falling. Im not using PHYS_Falling at all but using PHYS_Flying so I have to rely on NotifyHitWall not NotifyLanded.

                              But NotifyHitWall does not seem to get called for some reason. What makes it hard to solve is we dont have access to the under lying C++ source so I can see what conditions would normally trigger the NotifyHitWall.

                              Any other ideas?


                                That's really troublesome...

                                I would still use PHYS_Falling, set CustomGravityScaling to zero and apply a custom gravity Acceleration each Tick within your custom volume to overlapping pawns.

                                To get Landed events I think you have to increase the MaxFloorZ (can't remember exactly), but it's a constant

                                Another idea would be to use Trace each Tick by using Velocity direction and check for geometry collision.