DragDetectorクラス
ひとことで言うと
DragDetectorは、ロブロックス(Roblox)のクラスです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。
公式の説明(英語):Instance which facilitates and encourages interaction with 3D objects in an experience.
クラスの関係
受け継いでいるクラス:Object → Instance → ClickDetector → DragDetector
プロパティ(27)
| 名前と書き方 | 説明 |
|---|---|
ActivatedCursorIconDragDetector.ActivatedCursorIcon: ContentId | Sets the cursor icon to display when the mouse is activated over the parent of this DragDetector. |
ActivatedCursorIconContentDragDetector.ActivatedCursorIconContent: Content | Sets the cursor icon to display when the mouse is activated over the parent of this DragDetector. Only supports asset URIs |
ApplyAtCenterOfMassDragDetector.ApplyAtCenterOfMass: boolean | Whether constraint force is applied to the object's center of mass. |
AxisDragDetector.Axis: Vector3 | The primary axis of motion, expressed relative to the reference frame. |
DragFrameDragDetector.DragFrame: CFrame | The CFrame of the pivot, dependent on the drag detector's Class.DragDetector.ReferenceInstance|ReferenceInstance. |
DragStyleDragDetector.DragStyle: DragDetectorDragStyle | The paradigm used to generate proposed motion. |
EnabledDragDetector.Enabled: boolean | Whether the DragDetector responds to user input. |
GamepadModeSwitchKeyCodeDragDetector.GamepadModeSwitchKeyCode: KeyCode | During gamepad input, the modifier KeyCode for the secondary mode of motion. |
KeyboardModeSwitchKeyCodeDragDetector.KeyboardModeSwitchKeyCode: KeyCode | During keyboard input, the modifier KeyCode for the secondary mode of motion. |
MaxDragAngleDragDetector.MaxDragAngle: float | Along with Class.DragDetector.MinDragAngle|MinDragAngle, impedes the drag detector's attempts to generate motion. |
MaxDragTranslationDragDetector.MaxDragTranslation: Vector3 | Along with Class.DragDetector.MinDragTranslation|MinDragTranslation, impedes the drag detector's attempts to generate motion. |
MaxForceDragDetector.MaxForce: float | Maximum force applied for the object to reach its goal. |
MaxTorqueDragDetector.MaxTorque: float | Maximum torque applied for the object to reach its goal. |
MinDragAngleDragDetector.MinDragAngle: float | Along with Class.DragDetector.MaxDragAngle|MaxDragAngle, impedes the drag detector's attempts to generate motion. |
MinDragTranslationDragDetector.MinDragTranslation: Vector3 | Along with Class.DragDetector.MaxDragTranslation|MaxDragTranslation, impedes the drag detector's attempts to generate motion. |
OrientationDragDetector.Orientation: Vector3 | Specifies the **YXZ** rotation of axes of motion relative to the reference frame. |
PermissionPolicyDragDetector.PermissionPolicy: DragDetectorPermissionPolicy | Controls the permission level for which players can interact with the DragDetector. |
ReferenceInstanceDragDetector.ReferenceInstance: Instance | An instance whose CFrame is the reference frame for the drag detector. |
ResponseStyleDragDetector.ResponseStyle: DragDetectorResponseStyle | The paradigm used to move, or not move, the objects affected by the drag detector. |
ResponsivenessDragDetector.Responsiveness: float | Higher values cause the object to reach its goal more rapidly. |
RunLocallyDragDetector.RunLocally: boolean | Whether user input on a DragDetector replicates to the server or remains local to the specific client. |
SecondaryAxisDragDetector.SecondaryAxis: Vector3 | The secondary axis of the motion. |
TrackballRadialPullFactorDragDetector.TrackballRadialPullFactor: float | If Class.DragDetector.DragStyle|DragStyle is DragDetectorDragStyle.RotateTrackball, multiplier for adding a radial pull rotation as a contribution to the total. |
TrackballRollFactorDragDetector.TrackballRollFactor: float | If Class.DragDetector.DragStyle|DragStyle is DragDetectorDragStyle.RotateTrackball, multiplier for adding roll rotation to the total. |
VRSwitchKeyCodeDragDetector.VRSwitchKeyCode: KeyCode | During VR input, the modifier KeyCode for the secondary mode of motion. |
WorldAxisDragDetector.WorldAxis: Vector3 | The Class.DragDetector.Axis|Axis expressed in world space. |
WorldSecondaryAxisDragDetector.WorldSecondaryAxis: Vector3 | The Class.DragDetector.SecondaryAxis|SecondaryAxis expressed in world space. |
メソッド(5)
| 名前と書き方 | 説明 |
|---|---|
AddConstraintFunctionDragDetector:AddConstraintFunction(priority: int, function: Function): RBXScriptConnection | Adds a function to modify or constrain proposed motion. |
GetReferenceFrameDragDetector:GetReferenceFrame(): CFrame | Returns the reference CFrame in which motion is expressed. |
RestartDragDragDetector:RestartDrag(): () | May be invoked from a script to restart the drag using new parameters. |
SetDragStyleFunctionDragDetector:SetDragStyleFunction(function: Function): () | Passes a function to be used if and only if Class.DragDetector.DragStyle|DragStyle is set to DragDetectorDragStyle.Scriptable. |
SetPermissionPolicyFunctionDragDetector:SetPermissionPolicyFunction(function: Function): () | Passes a function to be used if and only if Class.DragDetector.PermissionPolicy|PermissionPolicy is set to DragDetectorPermissionPolicy.Scriptable. |
イベント(3)
| 名前と書き方 | 説明 |
|---|---|
DragContinueDragDetector.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. |
DragEndDragDetector.DragEnd(playerWhoDragged: Player) | Fires when a user stops dragging the object. |
DragStartDragDetector.DragStart(playerWhoDragged: Player, cursorRay: Ray, viewFrame: CFrame, hitFrame: CFrame, clickedPart: BasePart, vrInputFrame: OptionalCoordinateFrame, isModeSwitchKeyDown: boolean) | Fires when a user starts dragging the object. |
受け継いでいるメンバー
ClickDetector から受け継いでいるもの(7)
CursorIcon・CursorIconContent・MaxActivationDistance・MouseClick・MouseHoverEnter・MouseHoverLeave・RightMouseClick
Instance から受け継いでいるもの(46)
Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged
Object から受け継いでいるもの(4)
英語の説明とメンバーの一覧は、Roblox Creator Documentation(DragDetector)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。