|
| 31 Aug 2016 01:56 PM |
I have a model full of parts; I know how to position them in a circle but I want to make it even cooler. I'm using CFrame and they are anchored anyways. So if you have an idea/code example.. Thanks!
r+://69 |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
| |
|
|
| 31 Aug 2016 02:22 PM |
@Kodran
That's what I'm saying. I know how to do a basic circle around them, and maybe some basic up and down movement, I'm asking for an example of how to do something else that's cool.
r+://69 |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 31 Aug 2016 02:29 PM |
here's an archimedean spiral i wrote up real quick. look at the wikipedia page for archimedean spiral for a good explanation
local a=1 --change to turn the spiral local b=5 --'distance between successive turnings'
for angle=1,360 do --this only does 360 degrees of the spiral, increase to have more local p=Instance.new("Part",workspace) p.Anchored=true p.Size=Vector3.new(1,1,1) --spirally stuff local theta=math.rad(angle) --convert angle to radians local r=a+b*theta --spiral formula local x=r*math.cos(theta) --convert polar coordinates to cartesian local z=r*math.sin(theta) --^^^^^^^ p.CFrame=CFrame.new(Vector3.new(x,5,z)) --set pos end
|
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 31 Aug 2016 02:33 PM |
here's the result of that example. sorry for mutilating the link
(it's a g-y-a, etc,z-o)
/ 13 filter 72 filter d1 filter ea filter 6d filter f4 filter 88 filter bd filter b3 filter 9c filter 7f filter 75 filter 58 filter 23 filter 2c filter 50
|
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 31 Aug 2016 02:33 PM |
| To add to Kodrans point, you could look up parametric equations. Some real neat graphs. |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 31 Aug 2016 02:36 PM |
here's the link in a better way: local tab={104,116,116,112,115,58,47,47,103,121,97,122,111,46,99,111,109,47,49,51,55,50,100,49,101,97,54,100,102,52,56,56,98,100,98,51,57,99,55,102,55,53,53,56,50,51,50,99,53,48} print(string.char(unpack(tab)))
|
|
|
| Report Abuse |
|
|
| |
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 31 Aug 2016 02:38 PM |
| I don't think anyone is going to work that hard for a screenshot lmao |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 31 Aug 2016 02:43 PM |
not my fault the filter is a poopyhead :c
|
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
| |
|
|
| 31 Aug 2016 02:55 PM |
How can I make this more efficient?
#code local TabletOffsetX if (TabletCount <= 6) then TabletOffsetX = 5 elseif (TabletCount <= 15) then TabletOffsetX = 4 elseif (TabletCount <= 22) then TabletOffsetX = 3.5 elseif (TabletCount <= 28) then TabletOffsetX = 3 elseif (TabletCount <= 35) then TabletOffsetX = 2.5 elseif (TabletCount <= 43) then TabletOffsetX = 2 elseif (TabletCount <= 50) then TabletOffsetX = 1.5 else TabletOffsetX = 1 end
#code print("420 mlg noscope rekt!!") |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 31 Aug 2016 03:02 PM |
it's not inefficient, just ugly. you could potentially do like
x={{6,5},{15,4},{22,3.5},{28,3},{35,2.5},{43,2},{50,1.5}}
for i,v in pairs(x) do if tablecount <= v[1] then tableoffsetx=v[2] break end end
probs not the best way tho idk im lazy
|
|
|
| Report Abuse |
|
|
|
| 31 Aug 2016 03:05 PM |
| @Remastered I pitty the one who'll have to work with you one day... |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2016 03:06 PM |
local angle = 5 Part = Instance.new("Part", workspace) Part.Anchored=true while wait() do Part.CFrame = CFrame.new(0,0,0) * CFrame.Angles(0, 0, angle) * CFrame.new(2, 0, 0) angle = angle + math.rad(99) end
I like to call this one.. "Mr. Flappy"
|
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 31 Aug 2016 03:07 PM |
you might wanna add another one that's math.huge,1 so if it's larger than all the others it gets set to 1
|
|
|
| Report Abuse |
|
|
|
| 31 Aug 2016 03:15 PM |
Lol I'll take that and do something better, 1 sec
|
|
|
| Report Abuse |
|
|
|
| 31 Aug 2016 03:17 PM |
@Bern No. I know how to make orbs, were talking something different entirely.
@Kodran Thanks.
@Noone 1. No one will work with me, I fly solo. 2. Why do you hound me? Get out you stupid troll.
#code print("420 mlg noscope rekt!!") |
|
|
| Report Abuse |
|
|
| |
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 31 Aug 2016 05:04 PM |
"@Remastered I pitty the one who'll have to work with you one day... "
I pity your English teacher.
All these questions have driven me into existential angst and I find myself beginning to question myself and my motives |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2016 05:07 PM |
| My grammar is turned off when I'm on the forums, not to forget that I'm often on during midnight. |
|
|
| Report Abuse |
|
|
| |
|
|
| 31 Aug 2016 05:35 PM |
| I have some friends over, OK? They don't sleep until 3 am and we run LAN parties. |
|
|
| Report Abuse |
|
|
|
| 01 Sep 2016 10:07 PM |
x = 0 stairs = 300000 length = 1 width = 6 radius = 25 distance = 10
for j = 1, 2*radius/(distance*stairs) + 1 do for i = 1, stairs do local t = Instance.new("Part") t.Parent = game.Workspace t.Size = Vector3.new(length, 1, width) t.Anchored = true t.CFrame =(CFrame.fromEulerAnglesXYZ(0,x,0)+Vector3.new(radius*math.sin(x),distance*2*x,radius*math.cos(x))) wait(0.02) x = x+math.rad(length*2.5) end end
|
|
|
| Report Abuse |
|
|