Flight Simulator Basics

04 December 2015 21:42 #5663
A student I teach Blender to recently he said he wants to make a game, so I decided to learn Blend4Web together with him.
He wants to make a sort of flight simulator game.

For flying a plane and having the camera track it, I will start by examining the demo called "The Island".
For controlling a player object (the plane) with the WASD keys I will start by examining "Pyatigor's Tale".

Am I taking the right approach, to try to combine this existing code?
Also, how can I make the plane constantly move forward while it is in the sky?
(I would like for it to be able to take off and land too.)

07 December 2015 12:31 #5679
Hello and welcome to the forum!

Island demo is not the best example for your task. Petigor's Tale is a better choice. You can use similar camera constraints.

The most complicated part is physics. As there are no any flying presets in Bullet, I think, you should go with apply_force and apply_torque methods.

For example if you need a plane to move forward you should do something like this:
apply_force(plane_obj, 0, lifting_force, thrust_force)

Forces are applied in object's local space.

Anyway, this will require some experimentation. Wish luck to your project!
Blend4Web developer
08 December 2015 16:41 #5737
Thank you!

I'm still trying to figure many things out, so your help is very encouraging.
Please register or log in to leave a reply.