Level size too small in Irrlight

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
MedievalMagic13

Level size too small in Irrlight

Post by MedievalMagic13 »

Hello everybody.

I have a problem with loading .bsp files and meshes in Irrlight. I've made a level with Radiant, which I think is large enough to walk around in it (in the preview window it certainly is), but when I load it with Irrlight, it's very small.
I've scaled it now, this works fine, but now my level (just a few rooms) takes the whole grid in Radiant. It's the same problems with meshes, I have to scale them a lot, just too see them well in Irrlight.

Is there any way to solve this problem?
I think the camera is too big in Irrlight, but (if it is) how do I change it?
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Just change the movement speed of the camera and the ellipsoid size of the collision animator. This should solve your problem.
MedievalMagic13

Post by MedievalMagic13 »

Thanks for the answer, but I'm a completely newbie in the Irrlicht engine.
Could you please tell me how to do that, or what piece of code it is in the examples?
SuryIIID

Post by SuryIIID »

To create collision Animator

Code: Select all

	scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(selector, camera, core::vector3df(30,50,30),core::vector3df(0,-100,0), 100.0f,core::vector3df(0,50,0));
to see the parameters just look at the "scenemanager.h" at least that's the way i do it since my MSVC Intelisence doesnt work :?

Code: Select all

virtual ISceneNodeAnimatorCollisionResponse* createCollisionResponseAnimator(	ITriangleSelector* world, ISceneNode* sceneNode, const core::vector3df& ellipsoidRadius = core::vector3df(30,60,30),const core::vector3df& gravityPerSecond = core::vector3df(0,-100.0f,0),f32 accelerationPerSecond=100.0f,	const core::vector3df& ellipsoidTranslation = core::vector3df(0,0,0),	f32 slidingValue = 0.0005f) = 0;


now look this for the movement speed of the camera

Code: Select all

camera = smgr->addCameraSceneNodeFPS(0,100.0f,300.0f);
and look for the function declaration

Code: Select all

virtual ICameraSceneNode* addCameraSceneNodeFPS(ISceneNode* parent = 0,f32 rotateSpeed = 100.0f, f32 moveSpeed = 500.0f, s32 id=-1) = 0;
Hope this will help...
MedievalMagic13

Post by MedievalMagic13 »

Thanks for the answers. It works perfectly.
VeneX
Posts: 228
Joined: Sun Nov 30, 2003 3:32 pm
Location: The Netherlands
Contact:

Post by VeneX »

I have put the code

Code: Select all

q3node->IMeshManipulator::scaleMesh(core::vector3df(10.0,10.0,10.0)); 
in the collision detection example but it doesn't work:

Code: Select all

--------------------Configuration: ig - Win32 Debug--------------------
Compiling...
main.cpp
E:\Irrlicht 0.5\examples\imperial guard\main.cpp(45) : error C2039: 'IMeshManipulator' : is not a member of 'ISceneNode'
        e:\irrlicht 0.5\include\iscenenode.h(30) : see declaration of 'ISceneNode'
E:\Irrlicht 0.5\examples\imperial guard\main.cpp(45) : error C2039: 'IMeshManipulator' : is not a member of 'ISceneNode'
        e:\irrlicht 0.5\include\iscenenode.h(30) : see declaration of 'ISceneNode'
E:\Irrlicht 0.5\examples\imperial guard\main.cpp(45) : error C2653: 'IMeshManipulator' : is not a class or namespace name
E:\Irrlicht 0.5\examples\imperial guard\main.cpp(45) : error C2039: 'scaleMesh' : is not a member of 'ISceneNode'
        e:\irrlicht 0.5\include\iscenenode.h(30) : see declaration of 'ISceneNode'
Error executing cl.exe.

ig.exe - 4 error(s), 0 warning(s)
Visit my website @ www.venex.be
Plethora project will be added to the site
AMD AthlonXP 2600+, 512MB DDR, Radeon M10 (mobile 9600) PRO 64MB, WinXP
VeneX
Posts: 228
Joined: Sun Nov 30, 2003 3:32 pm
Location: The Netherlands
Contact:

Post by VeneX »

sorry it is

Code: Select all

q3node->setScale(vector3df(5,5,5));
and I used wrong namespaces :oops:
One question, what is it: x,y,z ore somethig else?
Visit my website @ www.venex.be
Plethora project will be added to the site
AMD AthlonXP 2600+, 512MB DDR, Radeon M10 (mobile 9600) PRO 64MB, WinXP
Post Reply