character detecting something when jumps

alejandro

28-06-2007 00:25:27

i am detecting when the character collide with something , but, when my character collide with some body that is up , he dont call the onShapeHit function

when he collide in the front , and by the sides, its works. but in the up side, of the character , it does not call the onShapeHit

when he jumps , he stops, because he find a shape up there, but the system doesnt call the onShapeHit.

when i put the cubeShape a little down , and the character collide with the front part, or the sides, he calls the onShapeHit

so my question , why he doesnt call the onShapeHit
when he collide with up side?
was happening ?

it something relate , to the displacement vector ?

alejandro

29-06-2007 18:50:32

Using ageia examples, this is what happens

http://www.genmedia.biz/problem.html

betajaen

29-06-2007 18:54:03

Are you using a capsule or a box with your character?

alejandro

29-06-2007 19:11:21

mPlayer = m_Scene->createCharacter("Personaje", Vector3(60,5,60),"type: capsule, dimensions: 4 4 0");

capsule

betajaen

29-06-2007 19:17:21

The thing that you are trying to hit your head upon, is it a mesh or a primitive shape (a cube for example?)

alejandro

29-06-2007 21:45:42

yes , its a CubeShape

betajaen

29-06-2007 21:48:14

I'd try and duplicate the ControllerDescription in the demo in the video with your current code.

There isn't really a reason why it's not colliding.

alejandro

29-06-2007 22:16:23

it is colling , but doesnt call the onShapeHit function .

i have tried with nxogre in my app , and also changing the code of the ageia examples , and nothing

betajaen

29-06-2007 22:38:24

So it won't call onShapeHit in NxOgre? or PhysX?

It should do, because without an onShapeHit then the Character would pass through the Cube.

What onShapeHit function are you using, is the Characters or the RigidBodies?

alejandro

29-06-2007 22:59:46

yes, doesnt call , like i show in the video , when the collision is by the sides , the system call the onShapeHit, i have add a breakpoint for stop when he colide with some group

...

virtual NxControllerAction onShapeHit(const NxControllerShapeHit& hit)
{
//renderTerrainTriangle(hit.faceID);

if(1 && hit.shape)
{
NxCollisionGroup group = hit.shape->getGroup();
if ( group==MI_GRUPO){

int enter=98; / / here is the breakpoint
}
....


and when the character jumps ., and touchs the box , its do not stop on the breakpoint , so i asume , that it isnt enter to the onshapehit.

and also i have tested , putting the gravity to ( 0 9 0 ) , and he go up and, touchs the box , but doesnt call the function.

betajaen

29-06-2007 23:23:56

Obviously something is wrong with PhysX if it collides with the top, but the collision isn't reported.

I'm guessing it's a bug with PhysX itself, but since the PhysX demo works and the NxOgre one doesn't it indicates that the setup of the Character is different.

You should also check if your logic of Group Checking is correct.

alejandro

30-06-2007 00:56:50

no , i have tested with both , NxOgre , and PhysX and both doesnt work ,
maybe , he just report in the front and sides ?

the group is correct.

Aiursrage2k

30-06-2007 00:58:53

Arcadij Yudae

When use Character Controller (hereinafter CC) beside I appeared following problem.
In our engime there is movers, which present itself kinematic actors.
The problem is, CC processes all collisions in move() function and only on displacement vector direction. If CC simply stands and on he acts only garavity, that CC processes the collisions with terrain only, but for instance revolving door passes drafty it.
Prompt please what solve a problem interactions CC and kinematic actors? What hear the event of the contact CC and kinematic actors?

NxControllerAction onShapeHit(const NxControllerShapeHit& hit) occurs only in the event of motion CC toward kinematic actors.

NxUserContactReport::onContactNotify(NxContactPair& pair, NxU32 events) possible get only having installed in NxCapsuleControllerDesc skinWidth equal zero, but when moving CC becomes very incorrect.

The question is barely readable, but poster Ming Jiang answers with a possible solution!

Ming Jiang

Kinematic actors will not generate contact reports when in contact with other kinematic actors.

Is it possible to create a trigger shape covering the kinematic mover, then use trigger report to get this event?

Thread title:Discussion: Problem with interactions Character Contro and kinematic actors
http://devsupport.ageia.com/ics/support ... eptID=1949

betajaen

30-06-2007 09:09:54

Well that doesn't make sense if the ShapeReport is being called if he hits it on the side.


One thing is puzzling me. You said that it physically hits the top of the cube and collides with it? Well the onShapeHit function is designed to control the collisions of the character. Without it, the character would pass through the cube (and everything else in your World).

Which indicates that there is another piece of code at work. Another thing puzzles me, if your using 0.9 why are you using the NxControllerAction onShapeHit code at all, when the ControllerHitReport does it for you.

alejandro

30-06-2007 18:42:05

You said that it physically hits the top of the cube and collides with it?

yes , he hits the top of a cube

Another thing puzzles me, if your using 0.9 why are you using the NxControllerAction onShapeHit code at all, when the ControllerHitReport does it for you.

as you did in you code :
// Go through any existing reporters.
for(CharacterHitReports::Iterator it = mHitReports.items.begin();it != mHitReports.items.end();++it) {
CharacterHitReport::Response r = (*it)->onActor(character, actor, shape, group, hit);


i create my own class, myHitReport , and is added to the hitReporters , and when the CC , collide with something, its calls all the hitReportes .
i understand that , there is some types of responses , RS_None , and others, so , its can iterate for all the reporters, or stop in someone if you want to.

CharacterHitReport::Response myHitReport::onActor(Character* ch, Actor* a, Shape* shape, Group* grupo, const NxControllerShapeHit& h) {
//---/////////////////////////////////////////////////////////////////////////////////////////////////////
if ( h.shape->getActor().getGroup() == GROUP_COLUMPIOS )
{
int aaaaa=0; // breakpoint here

}



i haved tested with my code , and its detect the collision , but doesnt call the onShapeHit
for be more sure, that the error wasnt me, or my code, i have, modify the ageia exaple code, (in the video ), and put other breakpoint , in the onShapeHit , function. and the same problem

there is another way to know , with what body is colling upside , and get, the pointer of it ?

i really like that you try, with the ageia examples, of CC, and try to know , with what body or actor , is colliding ,when the CC jumps

CC = character Controler
http://www.genmedia.biz/problem.html
http://devsupport.ageia.com/ics/support ... eptID=1949

betajaen

30-06-2007 19:03:46

Well if it's hitting the Cube then the HitReport list is working. If your passing on RS_None as your response then the DefaultHitReport (which is executed last) will handle the collision for you.

What does this do?

CharacterHitReport::Response myHitReport::onActor(Character* ch, Actor* a, Shape* shape, Group* group, const NxControllerShapeHit& h) {

std::stringstream ss;
ss << a->getName() << std::endl;
NxDebug(ss.str());

return CharacterHitReport::RS_None;
}


Check your NxOgre log and see what happens.

alejandro

02-07-2007 18:17:49

hey, what do you think about this

http://devsupport.ageia.com/ics/support ... eptID=1949

Discussion: Problem with character collision up side
Created on Thursday, June 21, 2007 at 10:04 AM.
It has been read 63 time(s) and replied to 5 time(s).