|
pX_setgroupcollision doesn't work?
#416022
01/27/13 11:03
01/27/13 11:03
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
Doesn't it work with PH_CHAR?? Manual said nothing about that.. I tried to use it, to disable the collusions between player and the platform. I use PH_CHAR for both of them (one CAPSULE and another one BOX). But they still have collusions... Using pXent_setgroup doesn't help as well.. when I use it, have no idea why but it messes up the code, so neither player or platform move, if player is standing on it! Can anyone conform this? Or doesn't it simply work with PH_CHAR?
What I actually try to archive, is to make platform be able to pass throw the player, to do not stop on him, but player shouldn't be able to pass throw the platform.
Plus, does pXent_setbodyflag work with PH_CHAR? I can't get it to work as well (it works with PH_RIGID very well).
|
|
|
Re: pX_setgroupcollision doesn't work?
[Re: Superku]
#416105
01/28/13 01:58
01/28/13 01:58
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
Nope, I use group 3 for player and 4 for platforms. Everything works pretty nice at the moment. When I stand on the platform, I add it's velocity as a global vector to player's movement, like this:
absForce.x += you.speedX;
absForce.y += you.speedY;
Z - adaptation isn't needed, as it's made by gravity, and anyway, platforms don't move in Z direction, only X or Y. This is just a idea of how I make player move with the platform, it's framerate independent in script (not as in example). Thing is, that when player falls down from the platform, it tries to move throw him, and starts moving upwards (cause of capsule hull). Edit: I didn't really understand, what you've mean by moving them manually.. I already to move them manually, do I?
|
|
|
Re: pX_setgroupcollision doesn't work?
[Re: 3run]
#416117
01/28/13 05:16
01/28/13 05:16
|
Joined: Feb 2010
Posts: 320 TANA/Madagascar
3dgs_snake
Senior Member
|
Senior Member
Joined: Feb 2010
Posts: 320
TANA/Madagascar
|
Hi, Firstly, using physX3 plugin you can do
pX3ent_setcollisionflag(capsule, cube, PX_PF_IGNORE_PAIR);
With the physX2 plugin, I think that collision filtering doesn't work with CCT. A thing you can do is create an invisible trigger bellow your moving platform. When your cct enters the trigger, you set the trigger flag of your moving platform (So cct will not collide with it). You need to reset it when cct is leaving the trigger volume.
|
|
|
Re: pX_setgroupcollision doesn't work?
[Re: 3run]
#416208
01/29/13 05:01
01/29/13 05:01
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
User
|
User
Joined: Oct 2004
Posts: 900
Lgh
|
Doesn't it work with PH_CHAR?? Manual said nothing about that.. I tried to use it, to disable the collusions between player and the platform. I use PH_CHAR for both of them (one CAPSULE and another one BOX). But they still have collusions... Using pXent_setgroup doesn't help as well.. when I use it, have no idea why but it messes up the code, so neither player or platform move, if player is standing on it! Can anyone conform this? Or doesn't it simply work with PH_CHAR?
What I actually try to archive, is to make platform be able to pass throw the player, to do not stop on him, but player shouldn't be able to pass throw the platform.
Plus, does pXent_setbodyflag work with PH_CHAR? I can't get it to work as well (it works with PH_RIGID very well). Check out what is going on in the sourcecode with pXent_setbodyflag?
|
|
|
|