View Full Version : PHYS_spider
OscarZulu9
11-17-2009, 11:30 PM
I heard about some kind of legacy class called PHYS_spider which would allow you to walk on walls.
I heard it was buggy, but here's what I'm trying to do. Let's say you go inside one of those space stations that rotate. You need to be forced against the outside wall with some sort of FVector, or maybe this old PHYS_spider class. I imagine that you just turn off all the gravity in the level, and use forces to simulate the centripetal effect, or any local gravity.
Anyways... this is a very pivotal part of my project, so I hope there is a solid solution out there. What I've heard, that worries me, is that it's hard to change the direction of the character to align itself perpendicular to the surface that he would be forced onto. If anyone knows how to apply forces in UDK, please help me out. Thanks :D :D
Makaze
11-18-2009, 12:03 AM
Gravity can be relative. There's no reason you can't assign an arbitrary gravity value to a custom pawn class based on the normal of the surface directly below it. I think the hardest part would be transitions but you could possibly fix that by aligning the character to a combination of the surface normals at their position and several points of ahead of their position.
OscarZulu9
11-18-2009, 02:15 AM
So that is based of the face normal, as opposed to the vertex normal? I believe that would be a sweet solution, but could it work with any actor type, like a static mesh, vs a rigged character? Also, do you know where I can find some more documentation on this? Is this a new feature to the PhysX in UDK?
I might have to dig through the nvidia forums......
OscarZulu9
11-18-2009, 02:20 AM
Ahh YESSS here we go... this is a start...
Gamasutra SMG article (http://www.gamasutra.com/view/feature/3593/games_demystified_super_mario_.php?print=1)
Makaze
11-18-2009, 10:53 PM
If I remember correctly there is some code in the grenade projectile class that uses surface normals it impacts with in order to determine bounces.
Xaklse
11-19-2009, 04:39 AM
If PHYS_Spider isn't working, consider using PHYS_Flying instead. Pospi used flying physics for his UT2004 mutator, Escher Player Physics (http://pospi.spadgos.com/index.php?pg=gamesSmall).
fritzmonkey
11-19-2009, 05:05 AM
I heard about some kind of legacy class called PHYS_spider which would allow you to walk on walls.
You heard wrong. PHYS_Spider is the physics type used for the spider mines in UT3. It will not let you walk on walls.
immortius
11-19-2009, 05:11 AM
PHYS_Flying is particularly suited for custom physics behaviours for players, because it has little in the way of built in effects. I used it for climbing ropes/ladders in UT3 (because PHYS_Climbing has some nasty limitations).
Blaaguuu
11-19-2009, 08:58 AM
You heard wrong. PHYS_Spider is the physics type used for the spider mines in UT3. It will not let you walk on walls.
PHYS_Spider can indeed be used to make players walk on walls... It's just a bit tricky to implement.
fritzmonkey
11-19-2009, 01:19 PM
You can use almost any of the physic states to let the player walk on walls. Previous posts talk about using PHYS_Flying. I was pointing out that setting the players physics type to PHYS_Spider will not let you walk on walls if that is all you do.
OscarZulu9
11-20-2009, 01:37 AM
I'm taking a look at The Escher mod that Pospi created, but durrr... how do I take a look at .u files to examine code with UDK or any program for that matter?
immortius
11-20-2009, 03:22 AM
Firstly, it is possible for the scripts to be stripped from .u files, so you might not be able to get the script out. It is unlikely though.
There are three way to export scripts:
1. Open the .u file(s) in the content browser in the editor, then under the actors view select File->Export all scripts.
2. Use the batchexport commandlet (http://udn.epicgames.com/Three/CommandletList.html#batchexport).
3. Open the .u file in a text editor like notepad. The plain text of the .u files can be found inside. This is the lazy alternative if you're in a rush. :P
OscarZulu9
11-21-2009, 01:38 AM
I did notice that you can see most of the code in notepad, but there was a lot of extra ascii junk... I thought it would be hard to extract it, and not have any syntax errors. Thanks for the tips! I'll let you know if they work.
Is there any confirmation out there if the normal direction works as a source for 'simulating' gravity. I doubt jumping and falling would work along normal direction, but at least i'd have gravity :S
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.