simple driving simulater, howto in 1.5.2 ?

Djoef

23-02-2009 11:32:03

Hi all,

I installed bloody mess & cake successfully.
The reason I need nxOgre for is quite simple.
I have a tunnel shape, and a camera inside it that can be moved using a joystick.
Up till now I am able to drive through the walls of the tunnel. To avoid that I looked at NxOgre and found something that makes me bounce against the walls.
Unfortunately this is not what I need, as the camera rolls over the ground after hitting a sidewall :)
While reading forums etc, It became clear that I should use a character. It is a bit unclear what I actually need here, and whether it is available in the latest version of NxOgre.
Do I need a framelistener, charactercontroller etc ?

Can someone give me a simple list of things to do in order to keep my camera from going through the walls of the tunnel ?
A small piece of (pseudo)code would be nice, or a link to a clear tutorial that is using this.

I have to add, I don't care that much about extra features, so I want to use an earlier version (as in 0.9)
All I need is raycasting (which I got working) and a ?character? so I don't get through the walls.
I want to keep it simlpe but accurate. (it is to be used in an experiment for research)


Thanks a lot !
Djoef

spacegaier

23-02-2009 12:24:30

Characters are not implemented´in NxOgre 1.5.2 yet.

But, you could have a look at NxOgre 0.9. There are special classes for driving simulation (such as NxOgreMotor and NxOgreShapeWheel). There are also many threads about it here in the forum.

You can get the old NxOgre branches from here: http://svn.nxogre.org/branches/

Djoef

23-02-2009 13:02:51

To make myself clear, I don't need a full simulated car..(I do not even model a car)
The only thing I need to do, is to navigate through the tunnel without traversing the walls.
So when you steer your "car" against a wall, you should "slide" along the wall until you correct your steering.
If its not a car, you could think of hoovering/floating through the tunnel
Hard to explain in words, but I guess you all know what I talk about.
So do I really need the motor & shapeweel for this ? or is there a more simple solution ?

spacegaier

23-02-2009 13:13:09

Then the easiest solution (imho) would be, to use a character and an actor (with NxOre 0.9 as characters aren't implemented in NxOgre 1.5.2 yet).

The tunnel is a simple actor (or body if you also want to visually represent it) and your car or whatever is a character (that is almost the same as a body except that there is a special system to steer / move the character called the characterController).

Djoef

23-02-2009 14:09:28

Great, Ill try to use that.
Is there a place where I can find an example / documentation ?
I do not work with a framelistener, is that a problem ?

thanks a lot !

spacegaier

23-02-2009 15:21:48

The best documentation of NxOgre is at the moment still the forum here. Just search through the posts.

Afaik, you don't need any Framelisteners. If you are lucky, I still have some old versions of my harddisk at home (I'm at work currently) of a project using Characters (which I worked on, before I used a local SVN repository).

In any case: If you have some problems, just post here in the forum.

Djoef

24-02-2009 12:17:47

It would be great if you have an example !
thanks

spacegaier

24-02-2009 12:25:11

I'll have a look this evening. I just wrote myself an email to remember myself of it at home.

betajaen

24-02-2009 12:55:02

If your going to do it via the kinematic route, then you don't really need the character.

Just a kinematic actor using intersections and raycasting would do just fine. You can do all of that in Bleeding.

spacegaier

24-02-2009 16:33:13

I found some old code from NxOgre 0.9 using the character system. The other way is what betajean just mentioned.

Djoef

24-02-2009 16:57:16

thank you !

Ill have a look at this :)
At the moment I was trying to do it with bleeding.
I downloaded the 0.9 version again, but I think i need to take an older PhysX version & Ogre version.. in order to build this older version, could that be the case ?
Do you have any idea what would be the best combination (Ogre, PhysX) to use if I want to use NxOgre0.9 ?

thanks again :)

spacegaier

24-02-2009 16:59:07

You can use the newest Ogre without any problems. However, I'm not sure which PhysX version, you need. betajean should know that.