|
Re: pXent official release! (using NVIDIA PhysX)
[Re: Tai]
#289732
09/15/09 08:06
09/15/09 08:06
|
Joined: Oct 2007
Posts: 5,210 Ä°stanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
|
everything runs fine on me too but: when i run this script with demo version it works, runs fine and objects collide with level:
#include <acknex.h>
#include "pXent.h"
#include <default.c>
#include <d3d9.h>
function ball()
{
pXent_settype(my, PH_RIGID, 1);
pXent_setfriction(my, 100);
pXent_setelasticity(my, 10);
}
function on_mouse_left_event()
{
while (mouse_left) {wait (1);}
ent_create ("earth.mdl", nullvector, ball);
}
function main()
{
fps_max = 70;
video_mode=8;
wait(1);
pX_setgravity(vector(0,0,-9.81));
pX_SetWorldSize(0.05);
level_load("level.wmb");
pXent_settype(level_ent,3,3);
}
but when i run it with licensed version i get a crash. error dialog says crash in "physx_startup" i do not believe this is a bug, just asking for help. p.s. if i remove the wait(1); line, both works but both doesnt collide with level.
3333333333
|
|
|
Re: pXent official release! (using NVIDIA PhysX)
[Re: Quad]
#289736
09/15/09 09:02
09/15/09 09:02
|
Joined: Mar 2009
Posts: 29
DavideG
Newbie
|
Newbie
Joined: Mar 2009
Posts: 29
|
It's fantastic Chris! good work!
----------------------------------------- Intel Core i7 950 4.2 GHz OC ASUS P6T DELUXE V2 Corsair H50 Liquid Cooling System 6 GB RAM DDR3 Triple Channel 1600 Mhz Corsair XMS3 Gainward GeForce GTX 480 1.5 GB GDDR5 HD Barracuda 1 TB 7200 RPM 64 MB Cache
|
|
|
Re: pXent official release! (using NVIDIA PhysX)
[Re: GorNaKosh]
#289769
09/15/09 13:35
09/15/09 13:35
|
Joined: Sep 2003
Posts: 271 Germany
Chris3D
OP
Member
|
OP
Member
Joined: Sep 2003
Posts: 271
Germany
|
Thank you all for your comments!
@Quadraxas: hi, I don't know why this error happens, but for a workaround you can try setting "-nx 100" in your command line options.
@the guys where the testlevel doesn't run: did you try the carlevel? does it also not run?
website coming soon!
|
|
|
Re: pXent official release! (using NVIDIA PhysX)
[Re: Chris3D]
#289770
09/15/09 13:40
09/15/09 13:40
|
Joined: Oct 2007
Posts: 5,210 Ä°stanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
|
Hey Chris,
yeah it worked this time thanks for the help.
3333333333
|
|
|
Re: pXent official release! (using NVIDIA PhysX)
[Re: GorNaKosh]
#289773
09/15/09 13:58
09/15/09 13:58
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
User
|
User
Joined: Oct 2004
Posts: 900
Lgh
|
Quadraxas: should works with pX_SetSimulationTime(60);wait(2); after pX_SetWorldSize(0.05);
#include <acknex.h>
#include "pXent.h"
#include <default.c>
#include <d3d9.h>
function ball()
{
pXent_settype(my, PH_RIGID, 1);
pXent_setfriction(my, 100);
pXent_setelasticity(my, 10);
}
function on_mouse_left_event()
{
while (mouse_left) {wait (1);}
ent_create ("earth.mdl", nullvector, ball);
}
function main()
{
fps_max = 70;
video_mode=8;
wait(1);
pX_setgravity(vector(0,0,-9.81));
pX_SetWorldSize(0.05);
pX_SetSimulationTime(60);
wait(2);
level_load("level.wmb");
pXent_settype(level_ent,3,3);
}
Chris: thx for update, now works with event, but I've problem with "wait (random(-10));" physics stops here, any solution? With ODE this code works fine for me.
ENTITY* e_sphere;
function remove_ent()
{
wait (random(-10));
pXent_settype(me, 0, 0);
ptr_remove(me);
}
function f_sphere()
{
VECTOR vKick;
e_sphere = my;
c_setminmax(e_sphere);
vKick.x = 1500; vKick.y = 0; vKick.z = 200;
ini_physics(PH_SPHERE, 1, PH_SPHERE, 50, 50, 50, 50);
if(ccd_onoff) pXent_SetCCDSkeleton(e_sphere,vector(0.25,0.25,0.25), 1);
vec_rotate(vKick,camera.pan);
//pXent_SetActorEventFlag ( e_sphere, level_ent, NX_NOTIFY_ON_START_TOUCH);
activate_collision_event(e_sphere);
pXent_addvelcentral(e_sphere, vKick);
my.event = remove_ent;
my.emask |= ENABLE_FRICTION;
}
function on_mouse_left_event()
{
if (mouse_mode > 0) return;
while (mouse_left) {wait (1);}
e_sphere = ent_create ("ball.mdl" , camera.x, f_sphere);
set (e_sphere, SHADOW);
}
|
|
|
Re: pXent official release! (using NVIDIA PhysX)
[Re: Cowabanga]
#289857
09/15/09 22:04
09/15/09 22:04
|
Joined: Sep 2003
Posts: 271 Germany
Chris3D
OP
Member
|
OP
Member
Joined: Sep 2003
Posts: 271
Germany
|
@Quadraxas: Do you have scaling problems with pXent_settype(hmp,3,PH_TERRAIN) or pXent_settype(hmp,3,PH_POLY) ? I will check this out!
@Cowabanga: Can you discribe the situation more detailed? when do the obejcts hang on its place? I haven't seen such case, yet.
@rojart: you are right! this is a problem, it stops because the event function runs in the phsyX main loop... but I think I can fix this.
website coming soon!
|
|
|
|