2 registered members (AndrewAMD, VoroneTZ),
396
guests, and 0
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
pXent_enable doesnt work
#417685
02/15/13 14:21
02/15/13 14:21
|
Joined: Nov 2008
Posts: 354 saeculum II
MPQ
OP
Senior Member
|
OP
Senior Member
Joined: Nov 2008
Posts: 354
saeculum II
|
Hi guys,
follwing problem has been appearing recently: when I use the following code lines:
pXent_enable (me, 0); vec_set (my.pan, vector (3,0,0)); pXent_enable (me, 1);
the physics entity gets automatically restored to its old angle after calling pXent_enable. But
pXent_enable (me, 0); vec_set (my.x, vecotr (3,0,0)); pXent_enable (me, 1);
works fine for me. The entity stays at its place after enableing the physX- engine.
So y does the angle-altering not work? Can anybody reproduce the bug?
new project in early stage...
Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com
|
|
|
Re: pXent_enable doesnt work
[Re: MPQ]
#417724
02/16/13 13:35
02/16/13 13:35
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
User
|
User
Joined: Oct 2004
Posts: 900
Lgh
|
... the physics entity gets automatically restored to its old angle after calling pXent_enable. ... Yes, if you use PH_CHAR, but not for static and dynamic hulls. Try pXent_rotate(my,NULL,vector(3,0,0)); directly. Why do you need pXent_enable if PH_CHAR was used?
|
|
|
Re: pXent_enable doesnt work
[Re: rojart]
#417887
02/19/13 09:57
02/19/13 09:57
|
Joined: Nov 2008
Posts: 354 saeculum II
MPQ
OP
Senior Member
|
OP
Senior Member
Joined: Nov 2008
Posts: 354
saeculum II
|
Ye, tried out pXent_rotate, but the same problem kept the same (dont understand that). So I went back to no-physX movement in my project and everything is workin fine now. I gonna use only static physics object from now on.
Last edited by MPQ; 02/19/13 10:00.
new project in early stage...
Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com
|
|
|
Re: pXent_enable doesnt work
[Re: MPQ]
#417889
02/19/13 10:20
02/19/13 10:20
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
User
|
User
Joined: Oct 2004
Posts: 900
Lgh
|
Ye, tried out pXent_rotate, but the same problem kept the same (dont understand that)... Any example? pXent_rotate works fine for me, like code below:
#include <default.c>
#include <ackphysx.h>
void main()
{
physX_open();
level_load("");
vec_set(camera->x, vector(-200, 0, 50));
ENTITY *box = ent_create("CUBE.MDL", NULL, NULL);
vec_set(box.scale_x,vector(5,5,.1));
pXent_settype(box, PH_CHAR, PH_BOX);
while(1)
{
draw_text("[Space] - Rotate", 5, 5, COLOR_RED);
if (key_space) pXent_rotate(box,NULL,vector(45,0,0));
wait(1);
}
}
|
|
|
Re: pXent_enable doesnt work
[Re: rojart]
#417893
02/19/13 11:33
02/19/13 11:33
|
Joined: Nov 2008
Posts: 354 saeculum II
MPQ
OP
Senior Member
|
OP
Senior Member
Joined: Nov 2008
Posts: 354
saeculum II
|
yes you are right, that works for me, too. But I am using angle and position correction for my entites in multiplayer. position correction worked so far via pXent_enable while angle correction was causing the problem above even when I used pXent_rotate the entity's angle got restored within the next frame after calling an other pXent_rotate-instruction. Maybe the pXent_rotate inside an event function caused the problem.
Nevertheless, when I managed to get through all this multiplayer stuff I gonna give physics movement an other chance!
Last edited by MPQ; 02/19/13 13:07.
new project in early stage...
Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com
|
|
|
Re: pXent_enable doesnt work
[Re: 3dgs_snake]
#417908
02/19/13 13:11
02/19/13 13:11
|
Joined: Nov 2008
Posts: 354 saeculum II
MPQ
OP
Senior Member
|
OP
Senior Member
Joined: Nov 2008
Posts: 354
saeculum II
|
thx guys, good to know! So it was the right desicion to turn back to non-physics movement in my case.
new project in early stage...
Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com
|
|
|
|