# DragDetector(ロブロックス クラス) > Instance which facilitates and encourages interaction with 3D objects in an experience. - URL:https://roblox.minecraft-okinawa.com/reference/classes/DragDetector/ - 公式:https://create.roblox.com/docs/reference/engine/classes/DragDetector - 受け継いでいるクラス:ClickDetector ## プロパティ - `DragDetector.ActivatedCursorIcon: ContentId`:Sets the cursor icon to display when the mouse is activated over the parent of this DragDetector. - `DragDetector.ActivatedCursorIconContent: Content`:Sets the cursor icon to display when the mouse is activated over the parent of this DragDetector. Only supports asset URIs - `DragDetector.ApplyAtCenterOfMass: boolean`:Whether constraint force is applied to the object's center of mass. - `DragDetector.Axis: Vector3`:The primary axis of motion, expressed relative to the reference frame. - `DragDetector.DragFrame: CFrame`:The CFrame of the pivot, dependent on the drag detector's Class.DragDetector.ReferenceInstance|ReferenceInstance. - `DragDetector.DragStyle: DragDetectorDragStyle`:The paradigm used to generate proposed motion. - `DragDetector.Enabled: boolean`:Whether the DragDetector responds to user input. - `DragDetector.GamepadModeSwitchKeyCode: KeyCode`:During gamepad input, the modifier KeyCode for the secondary mode of motion. - `DragDetector.KeyboardModeSwitchKeyCode: KeyCode`:During keyboard input, the modifier KeyCode for the secondary mode of motion. - `DragDetector.MaxDragAngle: float`:Along with Class.DragDetector.MinDragAngle|MinDragAngle, impedes the drag detector's attempts to generate motion. - `DragDetector.MaxDragTranslation: Vector3`:Along with Class.DragDetector.MinDragTranslation|MinDragTranslation, impedes the drag detector's attempts to generate motion. - `DragDetector.MaxForce: float`:Maximum force applied for the object to reach its goal. - `DragDetector.MaxTorque: float`:Maximum torque applied for the object to reach its goal. - `DragDetector.MinDragAngle: float`:Along with Class.DragDetector.MaxDragAngle|MaxDragAngle, impedes the drag detector's attempts to generate motion. - `DragDetector.MinDragTranslation: Vector3`:Along with Class.DragDetector.MaxDragTranslation|MaxDragTranslation, impedes the drag detector's attempts to generate motion. - `DragDetector.Orientation: Vector3`:Specifies the **YXZ** rotation of axes of motion relative to the reference frame. - `DragDetector.PermissionPolicy: DragDetectorPermissionPolicy`:Controls the permission level for which players can interact with the DragDetector. - `DragDetector.ReferenceInstance: Instance`:An instance whose CFrame is the reference frame for the drag detector. - `DragDetector.ResponseStyle: DragDetectorResponseStyle`:The paradigm used to move, or not move, the objects affected by the drag detector. - `DragDetector.Responsiveness: float`:Higher values cause the object to reach its goal more rapidly. - `DragDetector.RunLocally: boolean`:Whether user input on a DragDetector replicates to the server or remains local to the specific client. - `DragDetector.SecondaryAxis: Vector3`:The secondary axis of the motion. - `DragDetector.TrackballRadialPullFactor: float`:If Class.DragDetector.DragStyle|DragStyle is DragDetectorDragStyle.RotateTrackball, multiplier for adding a radial pull rotation as a contribution to the total. - `DragDetector.TrackballRollFactor: float`:If Class.DragDetector.DragStyle|DragStyle is DragDetectorDragStyle.RotateTrackball, multiplier for adding roll rotation to the total. - `DragDetector.VRSwitchKeyCode: KeyCode`:During VR input, the modifier KeyCode for the secondary mode of motion. - `DragDetector.WorldAxis: Vector3`:The Class.DragDetector.Axis|Axis expressed in world space. - `DragDetector.WorldSecondaryAxis: Vector3`:The Class.DragDetector.SecondaryAxis|SecondaryAxis expressed in world space. ## メソッド - `DragDetector:AddConstraintFunction(priority: int, function: Function): RBXScriptConnection`:Adds a function to modify or constrain proposed motion. - `DragDetector:GetReferenceFrame(): CFrame`:Returns the reference CFrame in which motion is expressed. - `DragDetector:RestartDrag(): ()`:May be invoked from a script to restart the drag using new parameters. - `DragDetector:SetDragStyleFunction(function: Function): ()`:Passes a function to be used if and only if Class.DragDetector.DragStyle|DragStyle is set to DragDetectorDragStyle.Scriptable. - `DragDetector:SetPermissionPolicyFunction(function: Function): ()`:Passes a function to be used if and only if Class.DragDetector.PermissionPolicy|PermissionPolicy is set to DragDetectorPermissionPolicy.Scriptable. ## イベント - `DragDetector.DragContinue(playerWhoDragged: Player, cursorRay: Ray, viewFrame: CFrame, vrInputFrame: OptionalCoordinateFrame, isModeSwitchKeyDown: boolean)`:Fires when a user continues dragging the object after Class.DragDetector.DragStart|DragStart has been initiated. - `DragDetector.DragEnd(playerWhoDragged: Player)`:Fires when a user stops dragging the object. - `DragDetector.DragStart(playerWhoDragged: Player, cursorRay: Ray, viewFrame: CFrame, hitFrame: CFrame, clickedPart: BasePart, vrInputFrame: OptionalCoordinateFrame, isModeSwitchKeyDown: boolean)`:Fires when a user starts dragging the object. 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)