Announcement

Collapse
No announcement yet.

Pawn Wall walking and directional gravity

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

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

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    That wont work...
    Code:
    /* 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?

    Leave a comment:


  • replied
    Landed is called when you hit a floor

    Leave a comment:


  • replied
    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:
    Code:
    // when the pawn lands goback to player walking
    event bool NotifyHitWall(vector HitNormal, actor Wall)
    {
    	GotoState('PlayerWalking');
    	return true;
    }
    Does anyone know why?

    Leave a comment:


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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    Cheater...

    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.

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


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

    Leave a comment:


  • replied
    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.

    Leave a comment:

Working...
X