|
| 16 Jun 2015 07:21 AM |
I might be able to use it on a gun, to replicate litozinamons work.
I have a dream, you cannot crush it. |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2015 07:22 AM |
Learn how to interpolate yourself. It is easy ._. Lerp lerp lerp
|
|
|
| Report Abuse |
|
|
|
| 16 Jun 2015 07:25 AM |
Im not that advanced.
I have a dream. You cannot crush it. |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2015 07:26 AM |
1. Get advanced by realizing it is basic 2. Get kinky 3. Get even more kinky 4. Want to get kinky? |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2015 07:27 AM |
I dont know how to interpolate, only loop cframe! and terribly!
I have a dream. You cannot crush it. |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2015 07:48 AM |
Fat of help you guys give.
I have a dream. You cannot crush it. |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2015 07:49 AM |
local lerp = function(a,b,c) return (1-c)*1 + c*b end
local lerp_vec3 = function(v1,v2,c) return Vector3.new( lerp(v1.X,v2.X,c), lerp(v1.Y,v2.Y,c), lerp(v1.Z,v2.Z,c) ) end
lerp lerp lerp
|
|
|
| Report Abuse |
|
|
|
| 16 Jun 2015 07:51 AM |
Move halfway between two points
local Point1 = Vector3.new(0,0,0) local Point2 = Vector3.new(10,10,10)
local end = lerp_vec3(Point1, Point2, 0.5)
print(end) |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2015 07:54 AM |
Oh i see so i do this
part:lerp(StartPos,EndPos,Increment)
I have a dream. You cannot crush it. |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2015 07:58 AM |
So this is what i have on my interpolator
local function Interpolate(Part,Pos1,Pos2,Inc,EndPos) repeat Part:lerp(Pos1,Pos2,Inc) game:GetService("RunService").RenderStepped:wait() until Part.Position == EndPos end
Correct?
I have a dream. You cannot crush it. |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2015 07:59 AM |
No.
part.Position:lerp(EndPos_vec3, alpha_normalized_number)
Basically...
part.Position:lerp(Vector3.new(10,10,10), 0.5)
Mine is better though because you can now lerp outside of Vector3 |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2015 08:08 AM |
no workyyyyy
I have a dream. You cannot crush it. |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2015 08:09 AM |
local function Interpolate(Part,Pos1,Pos2,Inc)
for i=0, 1, Inc do Part.Position = Part.Position:lerp(Pos1,Pos2,Inc) game:GetService("RunService").RenderStepped:wait() end
end |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2015 08:32 AM |
This is the code I used for testing. It works flawlessly, but it needs to be edited for moving forward towards something rather than space increments without direction.
local lerp = function(a,b,c) return (1-c)*1 + c*b end
local lerp_vec3 = function(v1,v2,c) return Vector3.new( lerp(v1.X,v2.X,c), lerp(v1.Y,v2.Y,c), lerp(v1.Z,v2.Z,c) ) end
local Lock = false
local LerpTo = function(Part, mouse, incre) if(not Lock)then Lock = true local ppos1 = Part.Position local ppos2 for i=0, 1, incre do ppos2 = mouse.Hit.p Part.Position = lerp_vec3(ppos1, ppos2, i) game:GetService("RunService").RenderStepped:wait() end Lock = false end end
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse()
Mouse.Move:connect(function() print("Move") LerpTo(game.Workspace.Part, Mouse, 0.01) end)
|
|
|
| Report Abuse |
|
|