Hi,
@ fastlane, No I don't seem to have these problems with cube phent objects.
@ Superjeu3D, I did re-upload the file incase it was corrupt.
I can minimize the problem to a degree. In the example I just uploaded again it is quite hard to make the ball go the level gemetry, but still possible if you get it trapped right.
Here's the basic code that pertains to the phent sphere if you still can't unzip the file for some reason. In WED the phent sphere's skills set to Mass = 30, friction = 75, bounciness = 75, bounce min speed = 5, and no_polygon = on.
These can of course be played around with from WED.
Code:
// some entity skills and flags
define group_id, skill2;
define mass, skill3;
define friction, skill4;
define bounciness, skill5;
define Bounce_Min_Speed, skill6;
define NO_POLYGON,flag7;
var earthgravity[3] = 0,0, -250;
function Main()
{
ph_setgravity( earthgravity );
.
}
// uses group_id
// uses Mass
// uses Friction
// uses Bounciness
// uses Bounce_Min_Speed
// uses NO_POLYGON
action PhentSphere
{
// set polygon collision on if flag says so
if(my.NO_POLYGON == OFF)
{
my.polygon = on;
}
// if entity has a phent group ID set it
if(my.GROUP_ID != 0)
{
phent_setgroup( my, my.GROUP_ID);
}
my.dynamic = on;
phent_settype(my, PH_RIGID, PH_SPHERE); // sets the object within the physics engine
phent_setmass(my, my.mass, PH_SPHERE);
phent_setfriction(my,my.friction);
phent_setelasticity(my, my.bounciness, my.bounce_min_speed);
phent_enable(my, ON); // enable the phent enitity
}
I am also using c_move(), which shouldn't matter, but might.
Let me know if you see anything wrong in the code.
Thanks,
Loco