(DISCONTINUED) CylindricalCast - CylinderCast with ease!

GitHub release (latest by date) github

CylindricalCast is the only Open-Source solution to cylindrical casting tasks on Roblox. The API makes use of the updated Roblox Raycast engine, It has a simple and easily readable API for casting cylinders!

Installation

Manual Installation

You can either take the toolbox Asset or download the latest Release and insert it into studio.

Rojo

You can use git submodules to clone this repo into your project:

$ git submodule add https://github.com/IdleBrickRBLX/CylindricalCast packages/CylindricalCast

Once inserted, Sync Roblox Studio and Rojo using the Rojo studio Plugin

Usage


local RunService = game:GetService("RunService")
local CylindricalCast = require(CylindricalCast_PATH_HERE)

local Cylinder = CylindricalCast.new({
    Quality = 30, -- The higher the quality the more precision you have. Recommended 15, 50
    Size = Vector3.new(1, 2, 2), -- (Thicknes, RadiusY, RadiusZ)
    Ignore = {},
    ThicknessQuality = 2 -- Quality on the X axis. Recommended 2, 3
})

RunService.RenderStepped:Connect(function()
    local yourCFrame = CFrame.new(0,5,0)

    Cylinder.Size = Vector3.new(1, 3, 3)
    Cylinder.RaycastParams.FilterDescendantsInstances = {}
    local Cast = Cylinder:Solve(yourCFrame)

    if Cast then
        print(Cast.Instance)
        print(Cast.Position)
    end
end)

Documentation

For a full overview of the API please head over to the Docs website

14 Likes

A few questions:

  1. What exactly is Cylindrical Raycasting and how is it used over normal raycasting?
  2. Any benchmark on how performant this is?

Cylindrical Raycasting raycasts a certain amount of times to make the shape of a cylinder meaning we can detect collisions on a cylinder. With performance we tried to simplify as much of the algorithm as we could and we ended up with some good results!
image
There is still a lot of room for improvement tho but there is a clear difference between the release build and the first version. It all depends on the settings you use when it comes to performance

Here are some realistic wheel collisions i made using my API

3 Likes

The Roblox VR video you sent does not load. Will this example be open source?

1 Like

No i have no plans to release that example