Jump to content

making a cockpit


epsilonion
 Share

Recommended Posts

Hi,

 

I am interested in doing a cockpit for a space type game.

 

I will create a model in 3DS max or blender, I am just wondering how to attach it to the first person camera in LUA, would it be a similar process as adding a HUD but not with the Draw command.

 

What I want to do is have clickable objects in the cockpit etc etc as well but that looks like it is the easy part lol...

 

I would use C++ but I am not comfortable enough with it yet so I would prefer to use LUA...

 

any help, I would be thank full for it..

Link to comment
Share on other sites

If you want to move your camera freely around the cockpit, then you load the model of the cockpit/place it in the scene. However do not parent it, since you can't move the mouse to press any buttons. If freelook is not needed, then you can parent it.

  1. Load/place the model.
     
  2. have a camera that contains a script with the camera rotation.
     
  3. in the same script you can use raycast to detect other objects that are part of the cockpit.
     
  4. If you want to move the cockpit, then the cockpit should have its own script

Link to comment
Share on other sites

the cockpit is more a sphere where u put the camera in.

i would memory the cam in the sphere script as property.

if it set if self.cam ~= nil then self:SetCamToCokpit(self.cam) end

at top Sphere script

Script.cam = nil --entity "Used Cam"

PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265

2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ...

3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8

Music : Samplitude Music Studio , Music Creator 7

IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...