|
| 18 Jul 2012 11:02 PM |
Hey people! my question is how do i make a model move in its own from one position to another randomly generated array of positions. I'm ok at scripting, so i am not asking for a whole script. Just somthing that will help me on my way.
Thx for the support! |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 18 Jul 2012 11:03 PM |
| Go to the roblox wiki and look up `MoveTo` and `TranslateBy` |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 18 Jul 2012 11:03 PM |
| Go to the roblox wiki and look up `MoveTo` and `TranslateBy` |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2012 11:04 PM |
Model:MoveTo(Vector3.new(0,0,0)) It moves the entire model to the position, but doesn't CFrame it so if you have parts already at 0,0,0, the model will be put on top of them. |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2012 11:05 PM |
| thanks, but what if i said i need the model to glide thier.... |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
| |
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 18 Jul 2012 11:07 PM |
| Also if you don't want it to move out of the way of other parts but move through them, use TranslateBy. |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2012 11:26 PM |
| The TranslateBy and MoveTo advise was helpful, but lerp made no sense. I still do not know how to glide objects like the creator of "the little men" did |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2012 11:29 PM |
| Try to make your own three dimensional tweening function then :D |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 18 Jul 2012 11:32 PM |
Vector3:Lerp(Vector3,alpha)
this returns a vector3 that is alpha between the other two given. AKA if I was to do
a:Lerp(b,0.5)
that would give a vector halfway between a and b. So if you wanted to make it move smoothly between point a and point b you would do something like
for i=0,1,0.01 do Wait(); model:MoveTo(start:Lerp(end,i)); end |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2012 10:54 AM |
| bump (just for more advise) |
|
|
| Report Abuse |
|
|