Page 1 of 1

A couple of questions.

Posted: Mon Nov 24, 2008 1:27 am
by Mad-Mazda
Q1: How can i set fog.
Q2: How can i change the speed of the camera?

Thanks

Posted: Mon Nov 24, 2008 2:49 am
by MasterM
I am not an expert but ill try to answer your questions :
Q1 : DONT KNOW
Q2 : by making a costum camera, and then you can define speed or change the fps camera source(never did it before).

Posted: Mon Nov 24, 2008 3:16 am
by Ion Dune
Q1: See tutorial/example 11.
Q2: Presumably you mean changing the speed of an FPS camera after it has been created. Like MasterM said, you could make a custom one or alter the source of the FPS camera. Alternatively, you could get a copy of the SVN, which uses an FPS Camera scene node animator which you could get a hold of from ISceneNode::getAnimators() and change the speed through.

Posted: Mon Nov 24, 2008 11:14 pm
by Mad-Mazda
Q1: Thanks for that.
Q2: Might wait awhile before i try that. Pretty new to Irrlicht

Posted: Mon Nov 24, 2008 11:27 pm
by hybrid
Well, you can also wait some more days and use Irrlicht 1.5, which will makes those features into an official release :)

Posted: Tue Nov 25, 2008 7:16 am
by Mad-Mazda
Oh ok awsome.

Posted: Tue Nov 25, 2008 7:52 am
by Mad-Mazda
Also instead of making a new topic for such a small thing i'll ask here. Can somebody please explain the parametres of core::rect<s32>(....)

Posted: Tue Nov 25, 2008 8:15 am
by rogerborg
Really?

Code: Select all

		rect(T x, T y, T x2, T y2)
			: UpperLeftCorner(x,y), LowerRightCorner(x2,y2) {}

		rect(const position2d<T>& upperLeft, const position2d<T>& lowerRight)
			: UpperLeftCorner(upperLeft), LowerRightCorner(lowerRight) {}

		rect(const position2d<T>& pos, const dimension2d<T>& size)
			: UpperLeftCorner(pos), LowerRightCorner(pos.X + size.Width, pos.Y + size.Height) {}
Really? ;)

Posted: Tue Nov 25, 2008 10:20 am
by Mad-Mazda
Ok thanks i can see how to use this now.

Posted: Tue Nov 25, 2008 10:31 am
by rogerborg
Note that the simplest IVideoDriver::draw2DImage() methods just needs a destination position, not a source or destination rectangle.

Posted: Tue Nov 25, 2008 7:46 pm
by Mad-Mazda
Ok thanks for the tip, i have another question about 2D images....Trasnparecny. How can i achieve transparency in images. Ive tryed making the image background transparent using

driver->makeColorKeyTexture(crosshair, core::position2d<s32>(0,0));

But that hasnt worked the background just stays black.

Posted: Tue Nov 25, 2008 8:01 pm
by B@z
you have to give it as a parameter to use alpha channel.

see the drawImage()'s parameters

Posted: Tue Nov 25, 2008 11:04 pm
by Dark_Kilauea
Here: Your new best friend

Read it, use it, bookmark it.