Is there a way to use inverted Gravity?
I use it for jumping/flying, with the Gravity to the sky, the camera starts slowly and becomes flying faster like Gravity, but is there a way to start fast and go slower and slower till it nearly stands still (and than I can set the Gravity to the floor so it will fall back). like throwing something in the air (like a ball)
inverted Gravity
inverted Gravity
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
Plethora project will be added to the site
AMD AthlonXP 2600+, 512MB DDR, Radeon M10 (mobile 9600) PRO 64MB, WinXP
-
Guest
another question: this doesn't work ofcourse because device isn't made jet but how to do?
and I tried AntiAliasing but I have no idea how it works.
Code: Select all
device = createDevice(video::EDT_DIRECTX9, device->getVideoModeList()->getDesktopResolution()
/*core::dimension2d<s32>(1024, 768)*/, 32, true, false, false, this);
//device->createDeviceEx(SIrrlichtCreationParameters::AntiAlias(D3DMULTISAMPLE_2_SAMPLES, true));that was me 
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
Plethora project will be added to the site
AMD AthlonXP 2600+, 512MB DDR, Radeon M10 (mobile 9600) PRO 64MB, WinXP
-
pfo
- Posts: 370
- Joined: Mon Aug 29, 2005 10:54 pm
- Location: http://web.utk.edu/~pfox1
Code: Select all
if(!jumping)
{ collider->setGravity(core::vector3df(0, 0.002f, 0));
jumping = true;
}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
Plethora project will be added to the site
AMD AthlonXP 2600+, 512MB DDR, Radeon M10 (mobile 9600) PRO 64MB, WinXP
-
pfo
- Posts: 370
- Joined: Mon Aug 29, 2005 10:54 pm
- Location: http://web.utk.edu/~pfox1
Foole's right, gravity is acceleration, it cause momentum, which is what you're looking for. Don't expect to be able to do something like just set a gravity value and have the engine take care of everything else, Irrlicht wasn't made for that. Try using Newton if you want that kind of effect. Inverting gravity is not a good way to implement jumping in my opinion. When you jump, you press your feet against the ground and exert a force on it. The fact that you leave the ground is because the ground pushes back, with an equal force that you exert on it, pushing you into the air. Gravity is still in effect, it's what eventually pulls you back down. Now, you don't want to simulate all of that when you jump, it's overkill for a game. The simple thing that is happening is when you jump, a force pushes you up. This force is in the opposite direction of gravity. Irrlicht doesn't simulate forces, and gravity is really a convenience it offers to allow realistic movement over landscapes.