ToboboT
|
  |
| Joined: 25 Jun 2011 |
| Total Posts: 2385 |
|
|
| 13 Dec 2013 04:35 PM |
local player = game.Players.LocalPlayer local cam = workspace.CurrentCamera local mouse = player:GetMouse() local speed = 40
-- mouse box is 100 up 100 down
repeat wait() until player print("Prepping for launch") wait(3) print("Reay for launch") wait(1) local plane = game.Lighting.Plane:clone() plane.Parent = workspace local float = Instance.new("BodyForce",plane) float.force = Vector3.new(0,plane:GetMass() * 196.1,0) cam.CameraSubject = plane cam.CameraType="Scriptable" while wait() do cam:Interpolate(CFrame.new(plane.CFrame.p)+ Vector3.new(0,5,30),CFrame.new(plane.CFrame.p)+ Vector3.new((mouse.X * .2) + plane.Position.X,(mouse.Y * -.2) + plane.Position.Y, plane.Position.Z),.5) plane.Velocity = cam.Focus.lookVector * speed end
Ok so the camera interpolates but the plane doesn't change course it stays the same? |
|
|
| Report Abuse |
|
|
ToboboT
|
  |
| Joined: 25 Jun 2011 |
| Total Posts: 2385 |
|
| |
|
|
| 13 Dec 2013 04:56 PM |
As far as I can tell, you only tell the plane to go the way its looking. Maybe try something like this?
local courseChange = CFrame.Angles(0,math.pi/254,0) plane.Velocity = CFrame.new(cam.Focus.lookVector * speed) * courseChange |
|
|
| Report Abuse |
|
|
ToboboT
|
  |
| Joined: 25 Jun 2011 |
| Total Posts: 2385 |
|
|
| 13 Dec 2013 05:01 PM |
| but vlocity is a vector3 value??? |
|
|
| Report Abuse |
|
|
ToboboT
|
  |
| Joined: 25 Jun 2011 |
| Total Posts: 2385 |
|
| |
|
getkoed
|
  |
| Joined: 18 Feb 2010 |
| Total Posts: 2298 |
|
| |
|
ToboboT
|
  |
| Joined: 25 Jun 2011 |
| Total Posts: 2385 |
|
| |
|
getkoed
|
  |
| Joined: 18 Feb 2010 |
| Total Posts: 2298 |
|
|
| 13 Dec 2013 05:29 PM |
sorry thought you said lookVector
well then make it Vector3 xD |
|
|
| Report Abuse |
|
|
ToboboT
|
  |
| Joined: 25 Jun 2011 |
| Total Posts: 2385 |
|
|
| 13 Dec 2013 05:30 PM |
no no no I just don't understand how I can change CFrame.Angles to be a vector sorta thing. or do I have to?
|
|
|
| Report Abuse |
|
|
getkoed
|
  |
| Joined: 18 Feb 2010 |
| Total Posts: 2298 |
|
|
| 13 Dec 2013 05:31 PM |
local courseChange = CFrame.Angles(0,math.pi/254,0) plane.Velocity = Vector3.new(cam.Focus.lookVector * speed) * courseChange
probably :d |
|
|
| Report Abuse |
|
|
ToboboT
|
  |
| Joined: 25 Jun 2011 |
| Total Posts: 2385 |
|
| |
|
ToboboT
|
  |
| Joined: 25 Jun 2011 |
| Total Posts: 2385 |
|
| |
|
|
| 13 Dec 2013 07:58 PM |
To change CFrame to Vector3 do
local cf = CFrame.new() local v3 = cf.p |
|
|
| Report Abuse |
|
|