Can't make a new topic

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
cooky451
Posts: 9
Joined: Sun Jun 26, 2011 12:12 pm
Location: Germany

Can't make a new topic

Post by cooky451 »

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!
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

The code is already in the 07 example:

Level collision:

Code: Select all

selector = smgr->createOctreeTriangleSelector(
				q3node->getMesh(), q3node, 128);
		q3node->setTriangleSelector(selector);
Player Collision:

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();  
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.
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
cooky451
Posts: 9
Joined: Sun Jun 26, 2011 12:12 pm
Location: Germany

Post by cooky451 »

Thanks for helping me, but it still doesn't want to work. I want a collision detection between two Models (Model & Level).

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();
While "selector" was created like in the tutorial:

Code: Select all

selector = smgr->createOctreeTriangleSelector(
				q3node->getMesh(), q3node, 128);
		q3node->setTriangleSelector(selector);
CuteAlien
Admin
Posts: 9718
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

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
cooky451
Posts: 9
Joined: Sun Jun 26, 2011 12:12 pm
Location: Germany

Post by cooky451 »

CuteAlien wrote:Maybe it was some temporary problem.
It's still the same. The "new topic" button links me to
http://irrlicht.sourceforge.net/phpBB2/ ... wtopic&f=1
and this link redirects me to
http://irrlicht.sourceforge.net/phpBB2/index.php
CuteAlien
Admin
Posts: 9718
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

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?
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
omg_fail
Posts: 83
Joined: Wed Apr 20, 2011 1:14 pm
Location: Germany/Bavaria
Contact:

Post by omg_fail »

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
omg_fail
Posts: 83
Joined: Wed Apr 20, 2011 1:14 pm
Location: Germany/Bavaria
Contact:

Post by omg_fail »

Wegen dem new topic :
Welchen browser verwendest du und welche version ? Könnet daran liegen.


...
Am i actually allowed to write in german

:o
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

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!
cooky451
Posts: 9
Joined: Sun Jun 26, 2011 12:12 pm
Location: Germany

Post by cooky451 »

I'm using Firefox 4 (5?) with Windows 7, this shouldn't be the problem ;)

@Topic:
I made a "ground", which actually is my level. Collision detection + gravity works fine with the camera, but it doesn't want to work for the ninja. (He hangs around at ~1m over the ground :roll: )
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

He hangs around at ~1m over the ground
As I already said try playing a bit with the collision ellipsoid parameters:

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..."
cooky451
Posts: 9
Joined: Sun Jun 26, 2011 12:12 pm
Location: Germany

Post by cooky451 »

OMG! Thanks!
I thought the hole time that I was creating him at this point and that the gravity wouln't have any effect on him. :oops:

Creating with (1,1,1) and (0,0,0) works fine.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Remove all your cookies etc. and re-login. This should help with such problems.
cooky451
Posts: 9
Joined: Sun Jun 26, 2011 12:12 pm
Location: Germany

Post by cooky451 »

hybrid wrote:Remove all your cookies etc. and re-login. This should help with such problems.
Works fine, thanks.
Post Reply