WorldRootクラス
ひとことで言うと
WorldRootは、ロブロックス(Roblox)のクラスです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。
公式の説明(英語):Base class for handling physics simulation and 3D spatial queries.
クラスの関係
受け継いでいるクラス:Object → Instance → PVInstance → Model → WorldRoot
このクラスを受け継ぐクラス:Workspace、WorldModel
メソッド(19)
| 名前と書き方 | 説明 |
|---|---|
ArePartsTouchingOthersWorldRoot:ArePartsTouchingOthers(partList: Instances, overlapIgnored: float): boolean | Returns true if any of the given BasePart are touching any other parts. |
BlockcastWorldRoot:Blockcast(cframe: CFrame, size: Vector3, direction: Vector3, params: RaycastParams): RaycastResult? | Casts a block shape in a given direction and returns a RaycastResult if the shape hits a BasePart or Terrain cell. |
BulkMoveToWorldRoot:BulkMoveTo(partList: Instances, cframeList: Array, eventMode: BulkMoveMode): () | Moves an array of Class.BasePart|BaseParts to an array of Datatype.CFrame|CFrames. |
CollisionGroupsAreCollidableWorldRoot:CollisionGroupsAreCollidable(name1: string, name2: string): boolean | Returns whether the two groups will collide in this world. |
CollisionGroupSetCollidableWorldRoot:CollisionGroupSetCollidable(name1: string, name2: string, collidable: boolean): () | Sets the collision status between two groups in this world. |
GetMaxCollisionGroupsWorldRoot:GetMaxCollisionGroups(): int | Returns the maximum number of collision groups in this world. |
GetPartBoundsInBoxWorldRoot:GetPartBoundsInBox(cframe: CFrame, size: Vector3, overlapParams: OverlapParams): List<BasePart> | Returns an array of parts whose **bounding boxes** overlap a given box. |
GetPartBoundsInRadiusWorldRoot:GetPartBoundsInRadius(position: Vector3, radius: float, overlapParams: OverlapParams): List<BasePart> | Returns an array of parts whose **bounding boxes** overlap a given sphere. |
GetPartsInPartWorldRoot:GetPartsInPart(part: BasePart, overlapParams: OverlapParams): List<BasePart> | Returns an array of parts whose occupied space is shared with the given part. |
GetRegisteredCollisionGroupsWorldRoot:GetRegisteredCollisionGroups(): Array | Returns a table with info on all of this world's collision groups. |
IKMoveToWorldRoot:IKMoveTo(part: BasePart, target: CFrame, translateStiffness: float, rotateStiffness: float, collisionsMode: IKCollisionsMode): () | Moves the specified part to the specified location via inverse kinematics rather than moving it there directly, to ensure any joints, constraints, or collisions that part is participating in remain physically satisfied. |
IsCollisionGroupRegisteredWorldRoot:IsCollisionGroupRegistered(name: string): boolean | Checks if a collision group is registered in this world. |
RaycastWorldRoot:Raycast(origin: Vector3, direction: Vector3, raycastParams: RaycastParams): RaycastResult? | Casts a ray using an origin, direction, and optional RaycastParams, then returns a RaycastResult if an eligible object or terrain intersects the ray. |
RegisterCollisionGroupWorldRoot:RegisterCollisionGroup(name: string): () | Registers a new collision group in this world with the given name. |
RenameCollisionGroupWorldRoot:RenameCollisionGroup(from: string, to: string): () | Renames specified collision group in this world. |
ShapecastWorldRoot:Shapecast(part: BasePart, direction: Vector3, params: RaycastParams, cframeOverride: CFrame?, sizeOverride: Vector3?): RaycastResult? | Casts the shape of a given BasePart in a direction and returns a RaycastResult if the shape hits a BasePart or Terrain cell. |
SpherecastWorldRoot:Spherecast(position: Vector3, radius: float, direction: Vector3, params: RaycastParams): RaycastResult? | Casts a spherical shape in a given direction and returns a RaycastResult if the shape hits a BasePart or Terrain cell. |
StepPhysicsWorldRoot:StepPhysics(dt: float, parts: Instances): () | Advances the simulation for parts in the world forward based on a specified time increment and an optional set of Class.BasePart|BaseParts. |
UnregisterCollisionGroupWorldRoot:UnregisterCollisionGroup(name: string): () | Unregisters the collision group for the given name in this world. |
受け継いでいるメンバー
Model から受け継いでいるもの(14)
LevelOfDetail・ModelStreamingMode・PrimaryPart・Scale・WorldPivot・AddPersistentPlayer・GetBoundingBox・GetExtentsSize・GetPersistentPlayers・GetScale・MoveTo・RemovePersistentPlayer・ScaleTo・TranslateBy
PVInstance から受け継いでいるもの(4)
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(WorldRoot)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。