You can use existing Gizmo libraries to achieve the same effect, this is the one I use:
Tested it and it seems like they’re not supported; it errors with “vector too long” whenever EditableMeshes are used. Since this feature works brilliantly with normal meshes, this should be a priority.
Even though it’s possible to create visualizations on your own, Roblox should still provide visualizations for convenience and also so you can be sure the visualizations are correct.
Agreed, I usually make my own visuals, but this would be much more convenient
This is big! This definitely simplifies the process of executing more complex world tasks.
This is awesome and extremely useful.
Is there any ETA on when we’ll get margins? We’re approaching an entire year since the release of Blockcast and Shapecast, and in that announcement, you guys said you were going to add margins. You also mentioned later that margins were being worked on in parallel with Shapecast. We’ve got Shapecast now (which again, is great), but we’re still hearing that margins are on their way. So, any idea when they might actually arrive?
Here’s some code for some quick visualizing.
local obj = workspace.obj
local dist = 10
local params = RaycastParams.new()
params.FilterDescendantsInstances = {obj}
local clone = obj:Clone()
clone.Parent = obj
clone.CFrame = obj.CFrame
clone.Transparency = 0.5
game["Run Service"].RenderStepped:Connect(function(dt)
local dir = obj.CFrame.LookVector
local shapecast = workspace:Shapecast(obj, dir * dist, params)
if shapecast then
clone.CFrame = CFrame.lookAt(obj.Position,obj.Position+dir) * CFrame.new(0,0,-shapecast.Distance)
else
clone.CFrame = CFrame.lookAt(obj.Position,obj.Position+dir) * CFrame.new(0,0,-dist)
end
end)
Margins as soon as possbile please
I will be using a cat model to raycast now…
jokes aside, great update
They have provided all the required objects to create performant debug gizmos (which is what ceive im gizmo was designed to be)
It looks like theyre using the same method that ceive im gizmo does with using wireframe handle adornments
Big +1 for this, we already have studio settings for highlighting physical assemblies and sleeping parts. It’d be great to actually see every raycast without having to boilerplate visuals in.
One problem I can think of is the CameraModule raycasts, but those can be ignored (I’m pretty sure they still infamously use workspace/FindPartOnRay
).
This is going to reduce furniture placement systems to like 50 lines of code lol
I did actually find one somewhat good usecase for having shapecasts not detect parts within their starting position.
This was actually somewhat useful to create really weird non-primitive hitboxes.
This is perhaps a very weird and niche usecase but I actually liked being able to do this with shapecasts.
If you do a super short shapecast it sort of does an “negative union” thing with itself which can be quite useful in some specific cases.
You can use stuff like this to make an “hollow” or bowl-shaped hitbox.
I thought it might be fun for some specific games that like to get creative with hitboxes and how characters can take damage and it saves time having to do a bunch of math to see in what your proximity and position is relative to the shapecast.
With this new system, couldn’t you just whip up some meshparts or unions of the shapes you want and use those?
I might be misinterpreting how this all works, usually I just let the physics engine do its thing rather than any custom hitbox type stuff.
You technically could but using primitive shapes in usually a lot faster than custom shaped.
Primitive shapes have simple formulas for calculating collision while for meshes it has to check every triangle.
Using a ball or a cube is a lot cheaper and faster performance wise in general.
This shape is called a crescent
I’m sorry it was a mistake on my end, really sorry for bothering you.
edit: turns out the issue was in the GetPartBoundsInBox()
that for some reason ignores the CollisionFidelity. Still annoying though, I don’t want to make a part just to use GetPartsInPart()
instead.
-- well there goes my only use case, good job roblox
/j
Dang this cool! Also, I forgot that BlockCasts and Spherecasts existed so that’s nice too xD
I assume this is why yesterday’s terrain renaming changes happened