Body Movement advice needed

frier

19-08-2007 02:29:02

I need to create a very simple vehicles style player in my game, and i need help choosing what objects in NxOgre/PhysX to use for my wanted movement. Ive looked at Character, Bodies and Bodies with wheels. ( i want a piece from all of them :) )

I want the movement to be similar to Mario Cart. Best Sample i could find

I'm looking at the body to have the following qualities:

#1 A very slight slide out when turning corners.
#2 A very simple incremental Accelerate/Decelerate.
#3 Needs to be able to make jumps off ramps, and also a parabolic like jump movement by a keypress.

This is all I'm having troubles implementing at the moment.

But my mindset is that i have to use a body with a bit of custom code for some of it.

Thanks for you help!.

-FrieR

Aiursrage2k

19-08-2007 04:18:19

In the ageia sdk there are 4 tutorials called vechiles. It starts off with one wheel then builds up to 4 wheels I guess thats where to start.

I loved mario kart, any chance you are making a battle mode?

frier

19-08-2007 04:43:14

Ive briefly looked at those tutorials, seemed like a bit much for what i need.. Ill look at it more in depth tonight though.

You know what aiursrage2k, my artist just told me 1 week ago to put a battle mode in, his concept sounded sweet, i will prob hand it over to one of the team members who's good with game design stuff, because battle mode is my type of thing as well 8) .

p.s. stupid question, but how do i get the debug bounding box's/wheels drawing with NxOgre, like the PhysX tutorials have the triangle in the circle for the wheel.

edit: im using Cake

kenny.bsp

19-08-2007 10:14:08


p.s. stupid question, but how do i get the debug bounding box's/wheels drawing with NxOgre, like the PhysX tutorials have the triangle in the circle for the wheel.

I'm using
mWorld->createDebugRenderer(mScene->getSceneManager());
It works, but looks kinda strange :D So I don't know if this is the right way to do it :D

betajaen

19-08-2007 11:05:27

Your better of using the RemoteDebugger for a while. The DebugRender is a hack job, and I don't like it.

As for your Mario Cart style car; You can use a body with a "wheelSet". As it's PhysX; It'll be more accurate than what your looking for, so you'll have to change the friction of the wheels when sliding in and out of corners and even add forces when you want to jump or have some power boosts.

This should get you started a little:

http://www.ogre3d.org/phpBB2addons/view ... 5047#25047

frier

19-08-2007 14:22:28

oh yeah i had the remote debugger half setup from before..

Yeah was just using that demo you made betajean, its great. Just a few Questions:

Should i use a motor with the wheelset? since i only know how to move it with a motor :S..

Also how do i stop the car from accelerating lol.

void Bug::ACCELERATE(){

mMotor->setAcceleration(1);

}

void Bug::DECELERATE(){
mMotor->setAcceleration(0);
}


i trigger the accelerate, it takes off. then i trigger the decelerate(the debugger hits the decelerate()) but it keeps on going like its using energiser.

i saw in simulate that the torque is sent to 0 when i decelerate();
:roll:

betajaen

19-08-2007 15:05:04

You can use the motor that comes with NxOgre, or you can create your own (you inherit it from DriveShaft that allows it to work with the wheelset).

But to slow down, apply the brakes. ;)