• entries
    743
  • comments
    1924
  • views
    580397

Edge Grabbing

Sign in to follow this  

1997 views

Afternoon.



Got the start of edge grabbing working now. You have to hold down left mouse while jumping or falling to enter the grabbing state, then the system will attach the character to an edge when it is close enough, locking him into the correct position and orientation.

Next up I'm going to tackle shimmying along the edges. With this in mind, I've added the facility to work out what the adjacent two edges to the current edge are (the red and blue lines in the video) which is just a case of getting a list of nearby bodies from the broadphase, then checking the distance between the opposite end points and the ends of the current edge. Fairly dull stuff, won't go on about it.

Nice to see that switching to rag doll from the grabbing position seems to work flawlessly. Will save a great deal of work with death animations and so on.

[EDIT]



Spent a couple of hours this morning roughing out some prototype stuff for shimmying along edges. Not quite as bad as I thought, although it is early days as yet. I'm basically just taking a normal pointing along the current edge, moving the position along the normal and doing another check for a valid grab position at the new position.

I'm also including a simple boolean intersection test of the character controller shape against the environment. I only update the position if all the tests pass. Since shimmying only moves a small number of units per frame, this should be acceptable and no need to actually resolve intersections with a minimun separating vector should be required, which makes life easier.

Obviously no animation yet and haven't started tackling shimmying around corners. I have the references to the next left and next right edges set up, so should be a case of working out how much I have overstepped the current edge, and then moving that amount along the next edge. I can do something with the normal returned by the PcGrab component to make the corner transition rotation work nicely I think.

Looks like editing my journal is no longer eating my YouTube links by the way, so thanks if someone sorted that out.

That's all for now really. Thanks for dropping by.
Sign in to follow this  


3 Comments


Recommended Comments

Thanks. Didn't realise how difficult it is to see the reference lines in the video, but doesn't really matter I guess.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now