of     2   
chevron_rightchevron_rightchevron_right

VoidFrost
#221333378Friday, July 14, 2017 9:27 PM GMT

lets say I have pointA and pointB (randomized points) and I do this: points = # ######## # ####### - pointA).magnitude the points variable is how many points is going to be inbetween pointA and pointB. now given this information, how would i define those points inbetween pointA and pointB? like if i wanted to position 3 parts on those # ####### how would i do that? these # ###### are perfectly inbetween pointA and pointB
VoidFrost
#221333432Friday, July 14, 2017 9:28 PM GMT

guys i cant cope with this. i really cant wrap my head around why roblox would do this injustice to us. pastebin/WG7YdCYd -- the post
LeafDoode
#221333545Friday, July 14, 2017 9:29 PM GMT

man what I wanna know is why ROBLOX even made Filtering in this sub forum
Mescalyne
#221333690Friday, July 14, 2017 9:32 PM GMT

(pointb - pointa).unit * (distance / points) * I where I is segment desired where 0 is start and points + 1 is the end
VoidFrost
#221334361Friday, July 14, 2017 9:40 PM GMT

that didn't work, it just gets positioned elsewhere. pointa is humanoidrootpart position and pointb is mouse position
VoidFrost
#221334568Friday, July 14, 2017 9:43 PM GMT

here is that part of the code pastebin/fE3spcq9
VoidFrost
#221334696Friday, July 14, 2017 9:45 PM GMT

wait damnit do i have to use rays >.<
Mescalyne
#221334707Friday, July 14, 2017 9:45 PM GMT

pointa * ((pointb - pointa).unit * (distance / points) * I) I apologize, that other one probably would always start at origin
VoidFrost
#221334735Friday, July 14, 2017 9:45 PM GMT

like, no problem but i thought this could be done without rays
Mescalyne
#221334784Friday, July 14, 2017 9:46 PM GMT

pointa + ((pointb - pointa).unit * (distance / points) * I) sorry I screwed that last one up too
Mescalyne
#221334896Friday, July 14, 2017 9:47 PM GMT

and by the way no, rays would involve the same exact math as this
VoidFrost
#221335146Friday, July 14, 2017 9:50 PM GMT

there is another thing i am curious about which i believe might be harder, but for instance: how would i move one of these parts between pointA and pointB to the left, IN ACCORDANCE TO THE LINE between pointA and pointB?
TruSight
#221335770Friday, July 14, 2017 9:57 PM GMT

After you create your points, use lerp() and cframe the part your moving to each of the desired points. OR just have a start and end point and lerp() can do the rest.
VoidFrost
#221335899Friday, July 14, 2017 9:59 PM GMT

that wasnt what i asked
VoidFrost
#221336054Friday, July 14, 2017 10:00 PM GMT

what i mean is, assuming all points have been made with that formula from that poster, now how would i move on of these points to the left by for instance, a stud, in accordance to the line/direction between the origin and end point
VoidFrost
#221336102Friday, July 14, 2017 10:01 PM GMT

################ ## ################## #######
VoidFrost
#221336140Friday, July 14, 2017 10:01 PM GMT

one *
Mescalyne
#221336357Friday, July 14, 2017 10:03 PM GMT

I really don't know how to explain what you should do for your thing but here's an example of the kind of effect you desire, if I'm understanding it right (starter character script) mouse = game.Players.LocalPlayer:GetMouse() mouse.Button1Down:connect(function() local hit = mouse.Hit.p local o = script.Parent.HumanoidRootPart.Position local halfway = o + (hit - o) / 2; local pointing_at = CFrame.new(halfway, hit) local p = Instance.new('Part') p.CFrame = pointing_at * CFrame.new(Vector3.new(1, 0, 0)) p.Size = Vector3.new(0.2, 0.2, (hit - o).magnitude) p.Parent = workspace p.CanCollide = false p.Anchored = true end) "p.CFrame = pointto * CFrame.new(Vector3.new(1, 0, 0))" translates it by (1, 0, 0) in local space. local space is a coordinate system respective to the CFrame's position and orientation Sorry I couldn't explain this better or provide instructions-- CFrames are a hard topic to teach.
VoidFrost
#221343566Friday, July 14, 2017 10:55 PM GMT

i was thinking about that, about getting the direction through that CFrame. but i cant do it because it confuses me, like what does that point-to constructor of CFrame return`?
VoidFrost
#221344169Friday, July 14, 2017 10:59 PM GMT

i know what it does, but i have difficulties doing more advanced calculations with it because of what it returns in such a calculation
Quasiduck
#221348836Friday, July 14, 2017 11:37 PM GMT

What do you mean exactly by to the 'left' of a line? Left in world coordinates? Or do you mean that a point is translated from the end point of the line on a perpendicular axis? (Like a disc with a stick going through it, then choosing some point on that disc to be defined as 'to the left' of the line?)
VoidFrost
#221349696Friday, July 14, 2017 11:45 PM GMT

i meant left in the local space of the direction of the pointa-pointb
VoidFrost
#221351766Saturday, July 15, 2017 12:05 AM GMT

local Point = Origin + (Direction * (PointByPointDistance) * i) that is the formula, but i cant seem to apply that with CFrame.new(startpoint, lookat)
Quasiduck
#221352617Saturday, July 15, 2017 12:14 AM GMT

That is just one direction though. To find a single left out of an infinitely possible number of lefts. You would have to use some other arbitrary direction as your up/ back vector. I'm just going to pick the global up axis as your second direction which I'll use to find a line perpendicular to your original line. pastebin /GUnFtYeg
VoidFrost
#221354040Saturday, July 15, 2017 12:28 AM GMT

no but, how do i apply whatever i want to my formula, since keep in mind, i amcreating # ###### ####### ###### and pointB. so all the points/parts inbetween pointA and pointB are positioned in aa straight line, but how would i take the first part in this line of points, and move it to the left relative to this line?

    of     2   
chevron_rightchevron_rightchevron_right