In case you’re not underestimating how complex this is, I’d like to share a quote from the pinned post:
That said, I’d start with handles and arc handles. I found them while working halfway through my transform tools and it looked promising enough at a glance for me to consider refactoring all my code again. Whether or not they’ll work on mobile or console is something I haven’t tested, so you’ll have to do that yourself.
I also tried using drag detectors, though that might not work if you don’t intend to create your own handles, learn how to display them through blocks, figure out how to get a mouse ray to ignore those aforementioned blocks, etc.
All in all, transform tools are nowhere near as simple as I think that you’re thinking they are. I don’t have a quick answer and I’d feel quite stupid if somebody gave an obvious and straightforward answer after me. Look up those classes I’ve linked and start working from there. Or if you’re up for it, make a more cohesive plan for how you want to handle this before asking some more specific questions.
Oh yes I forgot to mention, I just want to know how I could do it, and not your code, mb.
Yeah I might go with this, my main concern with handles and arc handles was that I dont believe that they have compatibility for mobile, and they certainly dont for console.
I tried making them 3 times, Im aware lol
Thanks Ill try some stuff out and see if I get anything to work!
Drag detectors have a DragStyle property, allowing you to limit dragging to one axis, both linearly and angularly. The axis is based on the drag detector’s orientation, so you can also get it to use any axis you want beyond the global ones.
Edit: Looking through the documentation, I realized that there’s also an Axis property that allows you to more easily control the drag detector’s orientation and, as a result, the axis of transformation. I’m beginning to think that, if not for the single issue of not being able to drag through blocks, I could’ve saved myself a lot of time.
RotateAndMoveHandlesWorking.rbxl (28.5 KB)
I have done that alot of time ago. That’s working example of rotate and move handles. I did my own handles with cone, cylinder, block and other handle adornments, so feel free to learn from this.
You can find script which realtes to that in downloadable place file.
All you need for it to work is some parts placed in workspace, cuz I have only baseplate there.
Since you seem to have experience, do you know if Handles work with Mobile and possibly console devices? This was the only reason I stopped using them, as I couldnt figure it out.
I never touched any other device than my laptop.
Assuming from other games, this handles work for mobile, but won’t work on console unless you make special handling for them.
Console support would probably be its own journey. Having it player friendly and all everything else. Console probably won’t have something like mobile and computer has which is the click position thing. But I could be wrong since I’ve never played on console
By any chance do you know if theres a way I can tell where DragDetector is being dragged? Similar to that of the Humanoid.MoveDirection? Or something similar?
If you’re going through with locking the movement to 1 axis, it should be the same as the Axis property I mentioned in my edit. Heck, even using Orientation like I originally suggested would’ve worked if you did a little bit of math.
so Im not sure if Im just dumb, but how exactly do I use the Axis or Orientation property to tell when its being dragged similar to that of Humanoid.MoveDirection?
From looking at it, neither of those values update, so ig Im just kinda confused.
You asked if there was a way to tell where the drag detector is being dragged. As for when, that can be done through events. I’ll leave it to you to figure out which one fits best, partially because I don’t know the minor details of how you want the tools to operate.
Now this is a bit more abstract (if I’m actually answering it correctly this time). My first idea would be to use DragFrame and compare it with ReferenceInstance’s cframe. With a bit of math, you should be able to define that negative means 1 direction and positive means the other.
For a move tool, if you subtract the cframes’ positions, you should end up with one of the coordinates not being 0, which can represent the translation it took to get there. For a rotate tool, you could do the same with the look vector component.
If you begin wandering into making those coordinates not line up with world space, that’s where things get a whole lot more complicated and you’d have to account for the rotation from world space.
well I figured it out, except I ran into an issue, it appears the client is unable to create working DragDetectors because of how it was made I presume.
Cause of this DragDetectors wont work, as the DragDetector needs to be completely client sided. So I dont know if this will work, so if you have any ideas that’d be greatly appreciated
Did you try enabling RunLocally? If you did, I’d start messing around with those arc handles and handles I mentioned earlier. Or, if you’re feeling desperate, I can give you ideas of how I achieved my probably less-than-ideal ones.
Yeah RunLocally doesnt work whether its set to true or not if you create the DragDetector via the client.
I thought about using Handles, but due to the lack of customizability I might just attempt to make my own system. Not sure how yet, but learnings fun so hopefully I figure it out.