challenge
27-09-2008 11:22:46
I just want to do something myself (like change direction etc) when two objects meet each other. And I don't want them to collide, could I realize that? How to?
Thanks for your answer
Thanks for your answer
challenge
27-09-2008 11:22:46
rewb0rn
28-09-2008 09:06:05
challenge
29-09-2008 03:07:41
rewb0rn
29-09-2008 18:18:02
challenge
02-10-2008 08:58:54
bool collision(OgreOde::Contact* contact){
// you can do more or less with this function (like nothing.) See the OgreOde examples for some ideas.
if (cf.getSetting("Friction", "Ball") == "infinity")
contact->setCoulombFriction(OgreOde::Utility::Infinity);
else
contact->setCoulombFriction(StringConverter::parseReal(cf.getSetting("Friction", "Ball")));
contact->setBouncyness(StringConverter::parseReal(cf.getSetting("Bouncyness", "Ball")));
if(Rotated == false)
{
SceneNode *mPNode;
mPNode=mSceneMgr->getEntity("Entity2")->getParentSceneNode();
Vector3 src = mPNode->getOrientation( ) * Vector3::UNIT_Y;
Ogre::Quaternion quat = src.getRotationTo(Vector3(1,1,1));
mPNode->rotate( quat ,Node::TS_PARENT);
Rotated=true;
}
return false;
}