Custom Character Collision (Non-Humanoid)

scripting
#1

I have a pretty basic custom character system , I need collisions for it at the moment i am setting the characters parts to CanCollide but its kinda glitchy/weird and i have no idea where to start

local MoveVector = (PrimaryPart.CFrame * Vector3.new(CharacterController.CharacterMovement.X * (DeltaTime * WalkSpeed) , 0 , CharacterController.CharacterMovement.Z * (DeltaTime * WalkSpeed)))

PrimaryPart.CFrame = CFrame.new(MoveVector  , MoveVector  + Vector3.new(DirectionVector.X , 0 , DirectionVector.Z)) * CFrame.Angles(0 , math.rad(360) , 0)

this is how i move the character CharacterMovement is a Vector2 Value form the inputs

#2

Check out Luanoid. It’s a custom character system written entirely in Lua. The camera is kinda broken, but the rest of the system is much stabler than any other attempt.

There is also an editable place on Roblox itself featuring it, but it’s a but out of date.

#3

Remember to put a disabled humanoid in your physics model, otherwise physics may throttle and lag for slow devices. This likely won’t help or fix anything for you in studio now, but it will prevent the game from being unplayable on phones.

2 Likes
#4

i checked that already but i don’t quite under how it works

#5

They cast multiple rays in shape of a cylinder to detect collisions around the character, then they group those positions into a mean plane that they use for physics.

#6

I can cast the rays but how would i use it?

#7

castCylinder is the module you are looking for. Located in RepFirst in CharacterControllerCore.

#8

So far i don’t understand a thing except it casts rays in a cylinder shape and i don’t even get the concept properly on how it helps with the collisions