Changeset 8693 in orxonox.OLD for branches/bsp_model/src/lib
- Timestamp:
- Jun 21, 2006, 11:33:10 PM (19 years ago)
- Location:
- branches/bsp_model/src/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/collision_reaction/cr_physics_ground_walk.cc
r8524 r8693 55 55 CollisionEvent* ce = collision->getCollisionEvents().front(); 56 56 Vector normal = ce->getGroundNormal(); 57 // normal.normalize();58 57 59 // put it back 60 // PRINTF(0)("putting it back to lastPos: \n"); 61 // this->lastPositions[0].debug(); 62 // PRINTF(0)("current pos:\n"); 63 // collision->getEntityB()->getAbsCoor().debug(); 64 65 58 66 59 Vector height = ce->getCollisionPosition() - collision->getEntityB()->getAbsCoor(); 67 60 if(ce->getGroundNormal().len() <= 0.1f) … … 74 67 downspeed++; 75 68 collision->getEntityB()->setAbsCoor(collision->getEntityB()->getAbsCoor() + Vector(0.0,-0.03*downspeed,0.0)); 76 69 77 70 } 78 71 else … … 81 74 { 82 75 //if(downspeed <= 0) downspeed =1; 83 collision->getEntityB()->setAbsCoor(collision->getEntityB()->getAbsCoor() + Vector(0.0,height.y+3.55,0.0)); 84 //collision->getEntityB()->setVelocity(Vector(0.0,0.0,0.0)); 76 collision->getEntityB()->setAbsCoor(collision->getEntityB()->getAbsCoor() + Vector(0.0,height.y+3.55,0.0)); 77 //collision->getEntityB()->setVelocity(Vector(0.0,0.0,0.0)); 85 78 } 86 79 downspeed = 0; 87 80 } 88 81 89 82 90 83 /* … … 93 86 collision->getEntityB()->setVelocity(Vector()); 94 87 collision->getEntityB()->setAbsCoor(this->lastPositions[1]); 95 88 96 89 */ 97 90 } -
branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc
r8534 r8693 41 41 #include "world_entity.h" 42 42 43 #include "aabb.h" 44 43 45 #include "util/loading/load_param.h" 44 46 #include "util/loading/factory.h" … … 942 944 this->outputFraction = 1.0f; 943 945 944 945 946 947 Vector forwardDir = worldEntity->getAbsDirX(); 948 forwardDir = forwardDir * 8.0f; 949 950 Vector upDir = worldEntity->getAbsDirY(); 951 upDir.x = 0.0; 952 upDir.y = 1.0; 953 upDir.z = 0.0; 946 AABB* box = worldEntity->getModelAABB(); 947 948 949 Vector forwardDir; 950 Vector upDir; 954 951 Vector dest; 955 /* 956 dest.x += forwardDir.x; 957 dest.y += forwardDir.y; 958 dest.z += forwardDir.z; 959 */ 960 Vector position = worldEntity->getAbsCoor() + upDir*5.0f ; 961 dest = worldEntity->getAbsCoor() - upDir*40.0f; // 962 Vector out = dest; 952 Vector position; 953 Vector out; 954 955 if( box != NULL) 956 { 957 forwardDir = worldEntity->getAbsDirX(); 958 forwardDir = forwardDir * 8.0f; 959 960 upDir = worldEntity->getAbsDirY(); 961 upDir.x = 0.0; 962 upDir.y = 1.0; 963 upDir.z = 0.0; 964 dest; 965 966 position = worldEntity->getAbsCoor() + box->center + box->axis[1] * box->halfLength[1]; 967 dest = worldEntity->getAbsCoor() + box->center - box->axis[1] * box->halfLength[1]; 968 out = dest; 969 970 } 971 else 972 { 973 forwardDir = worldEntity->getAbsDirX(); 974 forwardDir = forwardDir * 8.0f; 975 976 upDir = worldEntity->getAbsDirY(); 977 upDir.x = 0.0; 978 upDir.y = 1.0; 979 upDir.z = 0.0; 980 dest; 981 982 position = worldEntity->getAbsCoor() + upDir*5.0f; 983 dest = worldEntity->getAbsCoor() - upDir*40.0f; // 984 out = dest; 985 986 } 963 987 964 988
Note: See TracChangeset
for help on using the changeset viewer.