Faster RotationMatrix, IsEven bit shift and, work on MakeProperty module

This commit is contained in:
2024-04-22 16:57:42 -04:00
parent e3104595d8
commit 431ec165b8
6 changed files with 54 additions and 52 deletions

View File

@@ -2,13 +2,14 @@
--!native
--!strict
type Head = BasePart
type UpperTorso = BasePart
type Neck = Motor6D
type Waist = Motor6D
type NeckC0 = CFrame
type WaistC0 = CFrame
type UDP = UnreliableRemoteEvent
type Head = BasePart
type UpperTorso = BasePart
type Neck = Motor6D
type Waist = Motor6D
type NeckC0 = CFrame
type WaistC0 = CFrame
type UDP = UnreliableRemoteEvent
type CharacterShared = Folder
type struct_SpineMovement = {
Neck: CFrame,
@@ -23,7 +24,7 @@ type Impl_Constructor = {
Move: (self: ClassConstructor, CameraCFrame: CFrame, IsFirstPerson: boolean) -> ()
} & Impl_Static_Props
type Constructor_Fun = (Head: Head, UpperTorso: UpperTorso) -> ClassConstructor
type Constructor_Fun = (CharacterShared: CharacterShared, Head: Head, UpperTorso: UpperTorso) -> ClassConstructor
type Impl_Static_Props = {
Enabled: boolean,
Multiplier: number
@@ -46,17 +47,16 @@ Spine.__index = Spine
Spine.Enabled = true
Spine.Multiplier = .5
local Remote = Instance.new("UnreliableRemoteEvent") :: UDP
Remote.Name = "SpineStream"
Remote.Parent = _G.include(script, "CharacterShared")
function Spine.constructor(Head, UpperTorso)
function Spine.constructor(CharacterShared, Head, UpperTorso)
local self = {}
self.Remote = Instance.new("UnreliableRemoteEvent") :: UDP
self.Remote.Name = "SpineStream"
self.Remote.Parent = CharacterShared
self.Head = Head
self.UpperTorso = UpperTorso
self.Neck = Head:WaitForChild("Neck") :: Motor6D
self.Waist = UpperTorso:WaitForChild("Waist") :: Motor6D
self.Remote = Remote
self.NeckC0 = (self.Neck :: Motor6D).C0
self.WaistC0 = (self.Neck :: Motor6D).C0

View File

@@ -63,7 +63,7 @@ function Character.constructor(CharacterModel)
local HumanoidRootPart = CharacterModel:WaitForChild("HumanoidRootPart") :: HumanoidRootPart
self.CharacterShadows = Shadows.constructor(CharacterModel)
self.Spine = SpineModule.constructor(Head, UpperTorso)
self.Spine = SpineModule.constructor(self.CharacterShared, Head, UpperTorso)
self.Flashlight = FlashlightModule.constructor(self.CharacterShared, Player, HumanoidRootPart)
self.Actions = ActionsModule.constructor(self.CharacterShared, Player)