Can it be done with irrlicht?

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
Blitz

Can it be done with irrlicht?

Post by Blitz »

Hey,

Normally i would ask this kind of question. However, i'm getting a bit short on time and don't have enough time to learn something then to find out i can't do what i want with it. So here's the deal. We're doing a univ project. And what i need is to be able tilt the world in different ways so that a ball in that world starts to roll and pick up speed only through gravity. I've seen the animator examples with collision detection. It's a start, but i need it to start rolling on any surface that's not completly flat becuase of gravity. Is this possible in a simple and quick way? Or can irrlicht only do FPS kind of collision response were you only slide against walls and not any non flat surface ?
magicat
Posts: 19
Joined: Sun Apr 09, 2006 6:52 am

Post by magicat »

I'm not sure if Irrlicht alone can accomplish gravity, I don't think so. But, it is very easy to integrate Irrlicht with a nice phsysics engine. I recommended Newton, heres a tutorial on it if you're interested: http://irrlicht.sourceforge.net/tut_newton.html.
hybrid

Post by hybrid »

You might also take the normal vector of the triangle your ball is lying on and offset it into the direction it would be rolling to. Additionally use a rotation animation which rotates the ball depending on its offset. Could be possible, though this is completely faking the laws of physic.
Guest

Post by Guest »

What i had in mind was adding the colliding surfaces normals scaled to the velocity vector of the ball. The way I see it this is what happens in reality. The surface applies as large force in it's normal direction as the body is pressing on it.

And as for gravity, is just an acceleration in the negative y direction. So those parts aren't a problem.

What is, is if i can get the normals of the surfaces which the sphere collides. Maybe a code snippet?
Melancor
Posts: 7
Joined: Sun Apr 23, 2006 1:17 am

Post by Melancor »

There is a game called NEVERBALL
This game is pretty much the kind of what you want to make I believe. It also comes with a mini-golf based on the same engine (don't know which though).
The developer seems to provide support, maybe you can get additional help there regarding your project :)

Image
Post Reply