New engine features

Top  Previous  Next

Shader Improvements

 

Shaders can now also include code from external .fx files with the #include statement.

 

 

Physics Improvements

 

The maximum step height of character controllers can now be determined with pXent_setskinwidth.

 

#include <ackphysx.h>

 

function main()

{

       physX_open();

       level_load(""); // load an empty level

       vec_set(camera.x,vector(-100, 0, 30)); // set a proper camera position

       pXent_settype(NULL, PH_STATIC, PH_PLANE); // create a static plane at groundlevel zero

       while (1) // create a fresh cube every 2 seconds

       {

               ENTITY* my_cube = ent_create(CUBE_MDL, vector(random(100), random(50), 100), NULL);

               pXent_setskinwidth(my_cube, 0.5); // reduce the size of the collision box for the cubes, allowing them to be penetrated by the groud and by other cubes

               pXent_settype(my_cube, PH_RIGID, PH_BOX); // create a cube

               pXent_setelasticity(my_cube, 50); // set its elasticity

               pXent_addvelcentral(my_cube, vector(0, 0, 10)); // set its speed

               wait(-2);

       }

}

 

 

Level_ent Function Improvements

 

The level size (level_ent.min_x / max_x) function is now adapted to the maximum coordinate of an object moved or placed in the level when level_ent.max_x/min_x is changed in the script.