In Darkplaces we have libode1(497kb) and defs,its working good,but i have some problems with moving physics,looks like its stoping lol
Code: Select all
/DP_PHYSICS
//idea: LordHavoc
//darkplaces implementation: LordHavoc, divVerent
//constant definitions:
float MOVETYPE_PHYSICS = 32;
float SOLID_PHYSICS_BOX = 32;
float SOLID_PHYSICS_SPHERE = 33;
float SOLID_PHYSICS_CAPSULE = 34;
float JOINTTYPE_POINT = 1; // point; uses origin (anchor)
float JOINTTYPE_HINGE = 2; // hinge; uses origin (anchor) and angles (axis)
float JOINTTYPE_SLIDER = 3; // slider; uses angles (axis)
float JOINTTYPE_UNIVERSAL = 4; // universal; uses origin (anchor) and angles (forward is axis1, up is axis2)
float JOINTTYPE_HINGE2 = 5; // hinge2; uses origin (anchor), angles (axis1), velocity (axis2)
//field definitions:
.float mass;
.float bouncefactor;
.float bouncestop;
.float jointtype; // see JOINTTYPE_ definitions above
// common joint properties:
// .entity aiment, enemy; // connected objects
// .vector movedir;
// for a spring:
// movedir_x = spring constant (force multiplier, must be > 0)
// movedir_y = spring dampening constant to prevent oscillation (must be > 0)
// movedir_z = spring stop position (+/-)
// for a motor:
// movedir_x = desired motor velocity
// movedir_y = -1 * max motor force to use
// movedir_z = stop position (+/-), set to 0 for no stop
// note that ODE does not support both in one anyway
//description:
//various physics properties can be defined in an entity and are executed via
//ODE
//builtin definitions:
void(entity e, float physics_enabled) physics_enable = #540; // enable or disable physics on object
void(entity e, vector force, vector force_pos) physics_addforce = #541; // apply a force from certain origin, length of force vector is power of force
void(entity e, vector torque) physics_addtorque = #542; // add relative torque
//description: provides Open Dynamics Engine support, requires extenal dll to be present or engine compiled with statical link option
//be sure to checkextension for it to know if library i loaded and ready, also to enable physics set "physice_ode" cvar to 1
//note: this extension is highly experimental and may be unstable
//note: use SOLID_BSP on entities to get a trimesh collision models on them
all,what i found its
Code: Select all
#define ODE_PHYSICS
#ifdef ODE_PHYSICS
//DP_PHYSICS
float SOLID_PHYSICS_BOX = 32;
float SOLID_PHYSICS_SPHERE = 33;
float SOLID_PHYSICS_CAPSULE = 34;
float MOVETYPE_PHYSICS = 32;
.float mass;
#endif
How i can use it on FTE?)