It looks like you're new here. If you want to get involved, click one of these buttons!
orxVECTOR force;
force.fX = 0.0; //orx2F(-10.0);
force.fY = -10.0;
force.fZ = 0.0;
grid->beginPos.fZ = -0.1;
orxObject_SetPosition(sphere, &grid->beginPos);
orxObject_ApplyForce(sphere, &force, orxNULL);
orxObject_ApplyTorque(sphere, 50.0);
//orxObject_ApplyImpulse(sphere, &force, orxNULL);
[Basic_Sphere_Graphic]
Texture = ../../art/sphere.png
Pivot = left top
[Basic_Sphere_FullPartList]
Type = sphere
SelfFlags = 0x0001; <= This defines our collision flags
CheckMask = 0xFFFF; <= This defines the collision mask that will be testing on other objects
Solid = true
[Basic_Sphere_Body]
PartList = Basic_Sphere_FullPartList
Dynamic = true
AllowSleep = false
[Basic_Sphere_Object]
Graphic = Basic_Sphere_Graphic
Alpha = 1.0
Body = Basic_Sphere_Body
[Ground_Object]
Graphic = Ground_Graphic
Alpha = 1.0
[Ground_Graphic]
Texture = ../../art/ground_colored.png
Pivot = left top
[Wall_Body_FullPartList]
Type = box
SelfFlags = 0xFFFF; <= This defines our collision flags
CheckMask = 0x0001; <= This defines the collision mask that will be testing on other objects
Solid = true;
[Wall_Body]
PartList = Wall_Body_FullPartList
Dynamic = false
AllowSleep = false
Comments
Sorry for the delay but I'm currently in the process of moving from San Francisco to Montreal and don't have much computer time if any.
First thing: you should center your pivot on your ball object.
Second thing: you shouldn't apply both a torque and a force, it's unnecessary and they might either work against each other or combine into undesired effects.
If you push your ball with a force, frictions will make it roll.
Third thing: you can use literal names to define your SelfFlags/CheckMask. More info here.
Lastly, I'm afraid you'll have to ask also on the Box2D forum for advanced support as I'm no Box2D expert. Orx mostly forwards the info to Box2D and let it to its things. Setting up a physical simulation that behaves exactly the way the user wants is notoriously hard, and it's not just a Box2D thing either.
Good luck!
EDIT: Lol, one second later I got it right, thanks a lot.