Can't make a new topic
Can't make a new topic
Hi,
I'm from Germany so if anyone feels like answer in german -> great! (My english is not that good..)
I'm not able to start a new Topic at "beginners help". I have absolutely no idea why. When I click on the "new topic" button the forum directs me directly back to the main site. :?::?:
My problem:
How can I add collision detection + gravity to a model/mesh, like I can do this for the camera (tutorial 07)? Simple code would be great!
I'm from Germany so if anyone feels like answer in german -> great! (My english is not that good..)
I'm not able to start a new Topic at "beginners help". I have absolutely no idea why. When I click on the "new topic" button the forum directs me directly back to the main site. :?::?:
My problem:
How can I add collision detection + gravity to a model/mesh, like I can do this for the camera (tutorial 07)? Simple code would be great!
-
- Posts: 758
- Joined: Mon Mar 31, 2008 3:32 pm
- Location: Bulgaria
The code is already in the 07 example:
Level collision:
Player Collision:
Simply create an I(Animated)MeshSceneNode and replace the ###CAMERA### with its pointer. Just refer to the documentation if you have some doubts what are all these parameters used for.
Level collision:
Code: Select all
selector = smgr->createOctreeTriangleSelector(
q3node->getMesh(), q3node, 128);
q3node->setTriangleSelector(selector);
Code: Select all
scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
selector, ###CAMERA###, core::vector3df(30,50,30),
core::vector3df(0,-10,0), core::vector3df(0,30,0));
selector->drop(); // As soon as we're done with the selector, drop it.
###CAMERA###->addAnimator(anim);
anim->drop();
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Thanks for helping me, but it still doesn't want to work. I want a collision detection between two Models (Model & Level).
While "selector" was created like in the tutorial:
Code: Select all
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("ninja.b3d"),
0, IDFlag_IsPickable | IDFlag_IsHighlightable);
node->setScale(core::vector3df(10, 10, 10));
node->setPosition(core::vector3df(-70,100,-600));
node->setRotation(core::vector3df(0,90,0));
node->setAnimationSpeed(10.f);
node->getMaterial(0).NormalizeNormals = true;
scene::ITriangleSelector *sel = smgr->createTriangleSelector(node);
node->setTriangleSelector(sel);
sel->drop();
scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
selector, node, core::vector3df(30,50,30),
core::vector3df(0,-10,0), core::vector3df(0,30,0));
selector->drop();
node->addAnimator(anim);
anim->drop();
Code: Select all
selector = smgr->createOctreeTriangleSelector(
q3node->getMesh(), q3node, 128);
q3node->setTriangleSelector(selector);
No idea why new topic doesn't work for you. Maybe it was some temporary problem. Anyway - I'll just move this one to beginner.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
It's still the same. The "new topic" button links me toCuteAlien wrote:Maybe it was some temporary problem.
http://irrlicht.sourceforge.net/phpBB2/ ... wtopic&f=1
and this link redirects me to
http://irrlicht.sourceforge.net/phpBB2/index.php
Sorry, really no idea right now. That links allows me typing a topic (and I'm also sitting in germany).
Anyone else got an idea?
Anyone else got an idea?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
An internal server error I think.
Like you said its just temporary.
Warte einfach ein paar tage dann solltes wiedergehen wenn nicht schau mal auf deinen Internet acces
About the collision :
Benutzt du nur das model oder lädst du eine irr scene ?
Weil grafity ohne boden wäre keine gute idee
Und noch was :
Wenn du möchtest dass zwei z.B. ninjas nicht ineinander laufen solltest du zu einem physik engine greifen
Like you said its just temporary.
Warte einfach ein paar tage dann solltes wiedergehen wenn nicht schau mal auf deinen Internet acces
About the collision :
Benutzt du nur das model oder lädst du eine irr scene ?
Weil grafity ohne boden wäre keine gute idee
Und noch was :
Wenn du möchtest dass zwei z.B. ninjas nicht ineinander laufen solltest du zu einem physik engine greifen
No, you are only allowed to write: English, Dutch, Czech and Slovak
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
-
- Posts: 758
- Joined: Mon Mar 31, 2008 3:32 pm
- Location: Bulgaria
As I already said try playing a bit with the collision ellipsoid parameters:He hangs around at ~1m over the ground
Code: Select all
scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
selector, node,
core::vector3df(30,50,30), //<<<<<<<<<<<<< imagine a box with width of 30 and height of 50. The third parameter is the same as the first
core::vector3df(0,-10,0),
core::vector3df(0,30,0)); //<<<<<<<<<<<<< on Y axis- start with 0 and increase/decrease
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."