|
| 27 Feb 2015 11:04 AM |
only work on vector3 objects
it would actually take less effort to make it work on both floats and vector3s since they can both have arithmetic performed on them |
|
|
| Report Abuse |
|
|
Waffloid
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1606 |
|
|
| 27 Feb 2015 11:25 AM |
because
thats roblox for you |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 27 Feb 2015 11:46 AM |
because
1:lerp() -- syntax error
and (1):lerp() -- attempt to index a number value |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2015 12:00 PM |
| ("Hi"):reverse() --Attempt to index a string value |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2015 02:53 PM |
@dig ive made my own lerp function which has no problem running both vectors and floats
function cLerp(a,b,step) return ((a-b)*step)+a end
This lets you use:
vec1:cLerp(vec2) and float1:cLerp(float2)
why does this work? because the vector3 class can have arithmetic performed on it
so im just curious why the design of their function is to only accept vector3s. its an arbitrary limitation for its own sake, itd seem |
|
|
| Report Abuse |
|
|
LuaJake
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2009 |
|
|
| 27 Feb 2015 03:26 PM |
| Use .magnitude then use some math |
|
|
| Report Abuse |
|
|
MiniNob
|
  |
| Joined: 14 May 2013 |
| Total Posts: 822 |
|
| |
|
LuaJake
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2009 |
|
|
| 27 Feb 2015 03:30 PM |
| Use (point1.Position - point2.Position).magnitude*alpha, which is a decimal |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2015 03:42 PM |
@luajake i get it and ive already found a better solution to it
you can use magnitude and some math, just get one of the vector's values, make your own function, et cetera
im just pointing out how weird it is that you have to do that in the first place |
|
|
| Report Abuse |
|
|
LuaJake
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2009 |
|
|
| 27 Feb 2015 03:42 PM |
| Yeah, it'd be much easier if :Lerp() was implemented for other objects. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2015 03:44 PM |
| ModuleMaker has an interpolation module which allows you to interpolate pretty much everything on Roblox. |
|
|
| Report Abuse |
|
|
morash
|
  |
| Joined: 22 May 2010 |
| Total Posts: 5834 |
|
|
| 27 Feb 2015 03:47 PM |
| Well considering that a Vector3 is basically a table and lerp is a method in that table and that floats are a datatype and datatypes don't have methods, it seems very obvious why floats don't have a lerp method. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2015 03:57 PM |
"datatypes don't have methods" And of course no datatypes have EVER had some feature like this ("Hi"):reverse() |
|
|
| Report Abuse |
|
|
morash
|
  |
| Joined: 22 May 2010 |
| Total Posts: 5834 |
|
|
| 27 Feb 2015 04:01 PM |
| Strings are tables of characters. gg |
|
|
| Report Abuse |
|
|