We are excited to announce the release of a new beta that showcases an X-ray view for constraints and other workflow improvements!
Overview of changes and beta details
1. New “X-ray view” for constraint details
The new rendering treatment shows constraint visualizations that are inside parts with slight transparency to make it easier to visualize their depth when you select Constraint Details. This should make working with complicated mechanisms with many constraints much easier to work with and visualize.
Before:
After:
Note: With these changes the value of having a Draw on Top toggle is significantly decreased so we decided to remove the button to decrease the constraint UX complexity.
2. Selected Constraints, Attachments, NoCollisionConstraints, and WeldConstraints will show details, even when the global Constraint Details button is disabled
Even if the constraint details button is disabled, when specific constraint instances are selected in the Explorer, the single constraint is visualized with its details. This enables a much quicker building and debugging workflow for creators.
Enabling the Beta
Go to File > Beta Features and select Constraint Visualization Improvements to enable this beta. Be sure to restart Studio to allow the changes to take effect.
Next Steps
We will be reviewing all of your feedback to determine how we can continue to improve this feature. Alongside general feedback, we are also looking for cases where this may affect particular workflows.
Please let us know if you have any questions or concerns regarding his beta or anything else we covered in this post!
Shoutout to @Homeomorph for working on these changes!
You’ve always been able to visualize a raycast quite easily. Add this to the script just below your raycast:
--Hiding some of the more complex math so we don't need to copy/paste it
local intersection = result and result.Position or origin + direction
local distance = (origin - intersection).Magnitude
-- the actual visual part
local ray_visual = Instance.new("Part")
ray_visual.Size = Vector3.new(0.1, 0.1, distance)
ray_visual.CFrame = CFrame.new(origin, intersection)*CFrame.new(0, 0, -distance/2)
ray_visual.Name = "Raycast Result"
ray_visual.Color = Color3.new("Really red")
ray_visual.Parent = Workspace
You’ll need to fill in result, origin and direction yourself. result is the raycast you want to see, origin is the position you’re firing the cast from and direction is the direction your raycast is going in.
Is this perhaps what’s causing the much more significant render time in studio? In the past few days I’ve noticed that the Pass3dAdorn step is scaling up with the number of parts in a place in studio, even though there are no attachment or constraint objects inside of the parts. Online this does not seem to be an issue, but it makes performance testing a lot more tricky for games with a lot of parts in studio.
Interesting. Well the Draw On Top button in your screenshot indicates you don’t have this beta feature active (also we only enabled it this morning). This may be worth its own bug report thread.
This is probably not causing the issue you’re seeing, but the X-ray rendering we’re adding in this change does slightly slow studio down when Constraint Details is enabled in places with 100s of constraints. So in ~2 weeks we’ll have a budget where Constraint Details only draws the nearest few hundred Attachments and Constraints to the camera. So if you did have Attachments in those characters, drawing those would get faster in a couple weeks.
The toggle is completely removed in the beta because the “x-ray view” functions effectively as both options enabled at the same time. We’d like to know if there are cases where you’d prefer to see something other than the x-ray view.
Much needed quality-of-life update for the constraints system.
I was recently trying to rig a vehicle to utilize constraints and it was kind of hard to see where constraints were at relative to the position of other constraints. Hoping to see more positive changes in the future.
Nice! It would be good to have a tool to automatically put constraints in the center of a part, it is quite difficult to join both of them in the same position.
Yes, you absolutely can do that - but it still would be useful to have the visualizer built-in like other game engines. We shouldn’t expect game developers to waste time over such trivial matters.
Honestly, it’s the little things that count. Big huge updates are super exciting and nice but just small little QOL things are the cherry on top. I really hope there are more of these to come as they really can make a difference in the experience in Studio.