drarem Posted December 25, 2014 Posted December 25, 2014 I want to create a model like a car, attach camera to it and move the car/camera around. I would like the camera slightly above the roof of the car. What's the best way to do that? I played around with the FPS controller until my brain hurt. version 3.3 w/Lua Thanks. Quote
Thirsty Panther Posted December 26, 2014 Posted December 26, 2014 Shadmar and Josh have already done this for you. http://www.leadwerks.com/werkspace/page/viewitem?fileid=345315752 Quote
drarem Posted December 26, 2014 Author Posted December 26, 2014 I assigned this script to my camera->Object, but it doesn't seem to move. Script.window = Window:GetCurrent() Script.move = Vec3() function Script:Start() self.rotation = self.entity:GetRotation() self.entity:SetFriction(0,0) self.move = Vec3(0,0,0) end function Script:UpdatePhysics() self.move = Vec3(0,0,0) local movespeed= 10 if (self.window:KeyDown(Key.Up)) then self.move.x= movespeed * Time:GetSpeed() end if (self.window:KeyDown(Key.Down)) then self.move.x= -1 * movespeed * Time:GetSpeed() end self.entity:AddForce(self.move.x,0,self.move.z) Time:Update() end Quote
Recommended Posts
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.