Jump to content

Fun one :)


JRowe
 Share

Recommended Posts

So, this should be relatively easy. I want to have 3 forces acting on a ship moving through space, with no gravity acting on it (it will slow down on it's own, though.)

I have this part working well enough. It's simple: Increment or decrement acceleration along an axis relative to the ship based on the key being pressed, or if the mouse cursor is located along the top or bottom of the screen (up and down).

You'll need A.Percy's Irrlicht plugin from here: http://www.box.net/shared/47jcql2vqk

Download my script, then copy and paste both Au3Irrlicht.dll and Irrlicht.dll into the script folder, along with irrlichtplugins.au3.

You can fly around in a spaceship :mellow:

My problem is simple, I think. I want the camera to follow behind the ship model, while retaining the movement system. Anyone have any ideas?

Edited by jrowe
Link to comment
Share on other sites

Forgot to mention: Esc to quit, WASD to move the ship.

Once I can get a decent camera, I'm planning on doing a simple shooter game.

Link to comment
Share on other sites

To anyone else who are going to test this.

You have to change line 41 from:

$HeightMap = CreateImageFromFile( @ScriptDir & "\data\terrain-heightmap.bmp" )

To

$HeightMap = CreateImageFromFile( @ScriptDir & "\terrain-heightmap.bmp" )

Can't you use SetUpVector to position the camera behind the space ship all the time?

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Dunno, I'll check that out :mellow:

Well, so far so good. I've gotten the camera to chase, and now I need to make the increment and decrement work according to the relative orientation of the ship, and not the absolute orientation of the force vector. I'll add pitch and roll, too, I guess.

Edited by jrowe
Link to comment
Share on other sites

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...