|
Re: physx unregister / disable ent bugs ?
[Re: alibaba]
#464975
03/21/17 14:11
03/21/17 14:11
|
Joined: Dec 2011
Posts: 1,823 Netherlands
Reconnoiter
OP
Serious User
|
OP
Serious User
Joined: Dec 2011
Posts: 1,823
Netherlands
|
Ty for replying. I dont have any on_ent_remove's. Also it seems like I have it only for the characters, e.g. when I register e.g. a crate as a PH_CHAR and unregister after a wait it doesn't seem to cause any problems. So I think I am making a mistake in my character code somewhere but I dont know what. Some outstanding code:
//Set Collision Event
for (you = ent_next (NULL); you; you = ent_next (you)) {
if (you) {
if (you.TYPE == IS_ITEM || you.TYPE == IS_PROP_RIGID) pXent_setcollisionflag(my, you, NX_NOTIFY_ON_START_TOUCH);
}
}
But I unlink them through NX_IGNORE_PAIR before unregistering. Also when I unregister I also set the following (dont know if this matters): set(my, PASSABLE); my.emask &= ~DYNAMIC;
|
|
|
Re: physx unregister / disable ent bugs ?
[Re: Reconnoiter]
#464977
03/21/17 19:47
03/21/17 19:47
|
Joined: Dec 2011
Posts: 1,823 Netherlands
Reconnoiter
OP
Serious User
|
OP
Serious User
Joined: Dec 2011
Posts: 1,823
Netherlands
|
Hmm for some reason the doing following before registering as PH_CHAR does make it more stable (but still can bug out enemies after a while):
pXent_settype(my,0,0);
my.emask |= DYNAMIC;
wait(1);
Anyone know what is happening here?
|
|
|
Re: physx unregister / disable ent bugs ?
[Re: Reconnoiter]
#464983
03/22/17 09:57
03/22/17 09:57
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
Serious User
|
Serious User
Joined: Aug 2009
Posts: 1,438
Spain
|
I've used pXent_settype(my,0,0); also in a test level with enemies and didn't have that issue, although I didn't reset the dynamic flag afterwards. maybe the problem is related to resetting that flag?
3D Gamestudio A8 Pro AMD FX 8350 4.00 Ghz 16GB RAM Gigabyte GeForce GTX 960 4GB
|
|
|
Re: physx unregister / disable ent bugs ?
[Re: Reconnoiter]
#464993
03/23/17 11:40
03/23/17 11:40
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
Serious User
|
Serious User
Joined: Aug 2009
Posts: 1,438
Spain
|
Ty for reply, I tried that but it doesn't seem to make a difference. Also maybe important to note: only the enemies bug out but never the player actor (even while they share alot of functions). I tried comment the AI only lines out but doesn't seem to make a difference to. Only the 'player' pointer is different ofcourse.
Also you run Shade-c evo right Painkiller? So that should not be it than. yes, I'm running Shade-C too. Maybe you are using any global variable for the enemies that causes a conflict between them? or a memory leak issue?
3D Gamestudio A8 Pro AMD FX 8350 4.00 Ghz 16GB RAM Gigabyte GeForce GTX 960 4GB
|
|
|
Re: physx unregister / disable ent bugs ?
[Re: painkiller]
#465003
03/24/17 16:26
03/24/17 16:26
|
Joined: Dec 2011
Posts: 1,823 Netherlands
Reconnoiter
OP
Serious User
|
OP
Serious User
Joined: Dec 2011
Posts: 1,823
Netherlands
|
@Painkiller, in your tests, did you use pXent_move? After exhaustive testing (with stripped down code, no player and only a couple of enemies and terrain) it seems there becomes something wrong with pXent_move only, the rest seems to work well. Also I think that pXent_move bugs out enemies/player only during the frame(s) the enemy get unregistered, hence why the player rarely bugs out cause pXent_move is not constantly triggered for the player but is for enemies.
Last edited by Reconnoiter; 03/24/17 16:30.
|
|
|
Re: physx unregister / disable ent bugs ?
[Re: Reconnoiter]
#465007
03/25/17 11:45
03/25/17 11:45
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
Serious User
|
Serious User
Joined: Aug 2009
Posts: 1,438
Spain
|
@Painkiller, in your tests, did you use pXent_move? After exhaustive testing (with stripped down code, no player and only a couple of enemies and terrain) it seems there becomes something wrong with pXent_move only, the rest seems to work well. Also I think that pXent_move bugs out enemies/player only during the frame(s) the enemy get unregistered, hence why the player rarely bugs out cause pXent_move is not constantly triggered for the player but is for enemies. I use forces to move the characters, so yeah maybe it could be an issue with pXent_move
3D Gamestudio A8 Pro AMD FX 8350 4.00 Ghz 16GB RAM Gigabyte GeForce GTX 960 4GB
|
|
|
Re: physx unregister / disable ent bugs ?
[Re: painkiller]
#465010
03/25/17 16:52
03/25/17 16:52
|
Joined: Dec 2011
Posts: 1,823 Netherlands
Reconnoiter
OP
Serious User
|
OP
Serious User
Joined: Dec 2011
Posts: 1,823
Netherlands
|
Ditching pXent_move and pXent_rotate seems to have solved the problem and is also much cooler imo being able to push away enemies etc. What function do you use to move entities around? pXent_addvelcentral? Movement is still a bit floaty even though I have set pXent_setdamping to 100%.
Last edited by Reconnoiter; 03/25/17 16:52.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|