WorldRootクラス

クラスInstance.newでは作れない日本語解説は準備中

ひとことで言うと

WorldRootは、ロブロックス(Roblox)のクラスです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。

公式の説明(英語):Base class for handling physics simulation and 3D spatial queries.

クラスの関係

受け継いでいるクラス:Object → Instance → PVInstance → Model → WorldRoot

このクラスを受け継ぐクラス:Workspace、WorldModel

メソッド(19)

名前と書き方説明
ArePartsTouchingOthers
WorldRoot:ArePartsTouchingOthers(partList: Instances, overlapIgnored: float): boolean
Returns true if any of the given BasePart are touching any other parts.
Blockcast
WorldRoot: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.
BulkMoveTo
WorldRoot:BulkMoveTo(partList: Instances, cframeList: Array, eventMode: BulkMoveMode): ()
Moves an array of Class.BasePart|BaseParts to an array of Datatype.CFrame|CFrames.
CollisionGroupsAreCollidable
WorldRoot:CollisionGroupsAreCollidable(name1: string, name2: string): boolean
Returns whether the two groups will collide in this world.
CollisionGroupSetCollidable
WorldRoot:CollisionGroupSetCollidable(name1: string, name2: string, collidable: boolean): ()
Sets the collision status between two groups in this world.
GetMaxCollisionGroups
WorldRoot:GetMaxCollisionGroups(): int
Returns the maximum number of collision groups in this world.
GetPartBoundsInBox
WorldRoot:GetPartBoundsInBox(cframe: CFrame, size: Vector3, overlapParams: OverlapParams): List<BasePart>
Returns an array of parts whose **bounding boxes** overlap a given box.
GetPartBoundsInRadius
WorldRoot:GetPartBoundsInRadius(position: Vector3, radius: float, overlapParams: OverlapParams): List<BasePart>
Returns an array of parts whose **bounding boxes** overlap a given sphere.
GetPartsInPart
WorldRoot:GetPartsInPart(part: BasePart, overlapParams: OverlapParams): List<BasePart>
Returns an array of parts whose occupied space is shared with the given part.
GetRegisteredCollisionGroups
WorldRoot:GetRegisteredCollisionGroups(): Array
Returns a table with info on all of this world's collision groups.
IKMoveTo
WorldRoot: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.
IsCollisionGroupRegistered
WorldRoot:IsCollisionGroupRegistered(name: string): boolean
Checks if a collision group is registered in this world.
Raycast
WorldRoot: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.
RegisterCollisionGroup
WorldRoot:RegisterCollisionGroup(name: string): ()
Registers a new collision group in this world with the given name.
RenameCollisionGroup
WorldRoot:RenameCollisionGroup(from: string, to: string): ()
Renames specified collision group in this world.
Shapecast
WorldRoot: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.
Spherecast
WorldRoot: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.
StepPhysics
WorldRoot: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.
UnregisterCollisionGroup
WorldRoot: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)

Origin・Pivot Offset・GetPivot・PivotTo

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)

ClassName・GetPropertyChangedSignal・IsA・Changed

英語の説明とメンバーの一覧は、Roblox Creator Documentation(WorldRoot)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む