#pragma once #include "objects/base/instance.h" #include #include class Part; class Workspace; class Snap : public Instance { rp::FixedJoint* joint = nullptr; // The workspace the joint was created in, if it exists std::weak_ptr jointWorkspace; protected: void OnAncestryChanged(std::optional>, std::optional>) override; void onUpdated(std::string property); void buildJoint(); void breakJoint(); public: const static InstanceType TYPE; std::weak_ptr part0; std::weak_ptr part1; Data::CFrame c0; Data::CFrame c1; Snap(); ~Snap(); static inline std::shared_ptr New() { return std::make_shared(); }; static inline std::shared_ptr Create() { return std::make_shared(); }; virtual const InstanceType* GetClass() override; };