Page 1 of 1

collision ellipse doesn't rotate

Posted: Tue Feb 21, 2006 4:57 pm
by warden
hi there

i got a problem: i have a collisionresponseanimator attached to a scenenode which holds a rectangle (size=(2,1,1) at a certain position (x,0,0).

the ellipse is also set to this size and the translation.

the error: when rotating the scenenode to a new angle, the rectangle childnode rotates well but the ellipse doesn't! it always stays at position (x,0,0) and stretches around (2,1,1) although the other childnode is i.e. at (x*cos(alpha),x*sin(alpha),0) due to rotation of the parent scenenode by alpha.

isn't rotation forwarded to the ellipse?

what can i do? reset the ellipsoid radius every frame? it will never fit the rectangle fully! any alternatives??

thanks a lot, folks!
warden

Collision ellipse doesn't rotate

Posted: Sat Sep 01, 2007 4:04 am
by Panther
I have noticed the same problem. If anyone's interested, I can post the code to repeat the problem.

It would also be really nice if there was an easy way to make the collision ellipse visible.

Posted: Sat Sep 01, 2007 9:38 pm
by hybrid
Yes, please do post some code.

Irrlicht collision bug example

Posted: Sun Sep 02, 2007 2:40 am
by Panther
This code demonstrates that Irrlicht does not rotate the collision response animator ellipsoid when the object it is attached to is rotated. I have posted a stripped down version of my game code here:

Collision-Bug.zip

Ok, you're looking at a yellow taxi from above. It is trapped in a terrain box. To exit the program, you simply hit the escape key.

Image

You can move it forward, back, left, and right by tapping the W, S, Q, and E keys respectively. If you do so, it should stop at the walls normally. You can also hit SPACE to make it stop.

Now rotate the car 90 degrees to the left, using the A and D keys. Again, move the car around. It now will act weird. It will stop at an invisible wall at the bottom, and will stab into the left wall:

Image

Oh, and the yellow 3D box? That was my feeble attempt to make the collision response ellipsoid visible by drawing a bounding box around it (it's not accurate). If anyone can help me make my ellipsoid visible, that would be great!

There it is! Hopefully this is a mistake on my part and not really an Irrlicht bug! :wink:

Note 1: I am using Irrlicht v1.3, not the latest.
Note 2: In my .sln file, I put my Irrlicht .h files in "C:\3D-Game-Writing\Game-Graphics\include"; change this to where your Irrlicht is in Project Properties.

Posted: Tue Jul 01, 2008 1:55 pm
by }{ermanssoN
Will I gues I have to join the mobb :)

I think i have the same problem, im makeing a fps demo and just started toa dd simple walk physics:

Code: Select all

	m_pTringleSelector = pSceneManager->createOctTreeTriangleSelector( pWorld->pWorldMesh->getMesh( 0 ), pWorld->pWorldNode, 128 );
	
	pCamNode->setTriangleSelector( m_pTringleSelector );

	m_pTringleSelector->drop(); //If we change to a new world grab the            TringleSelector, and don't forget to drop() it again
	
	m_pCollisionAnimator = pSceneManager->createCollisionResponseAnimator( m_pTringleSelector, pCamNode, core::vector3df(10,50,10), vector3df( 0, -500, 0) );

	pCamNode->addAnimator( m_pCollisionAnimator );
	m_pCollisionAnimator->drop()
When I run this, My camera can't rotate freely, first im flying and the the whole scren trmbles untill i fly down to the ground so i get collision. when I do I can't look up again.

I have a gun childed to pcamNode and it rotates as i should