Reference API Roblox

Engine API

Website

Related

Reference API Roblox

WorldModel

Provides some physics features to a ViewportFrame.

Member index 0

HistoryMember
No members defined by WorldModel.
inherited from WorldRoot
462ArePartsTouchingOthers(partList: Objects, overlapIgnored: float = 0.000199999995): bool
638Blockcast(cframe: CFrame, size: Vector3, direction: Vector3, params: RaycastParams = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): RaycastResult?
573BulkMoveTo(partList: Objects, cframeList: Array, eventMode: BulkMoveMode = FireAllEvents): null
552CacheCurrentTerrain(id: string, center: Vector3, radius: float): string
552ClearCachedTerrain(id: string): bool
553FindPartOnRay(ray: Ray, ignoreDescendantsInstance: Instance = Instance, terrainCellsAreCubes: bool = false, ignoreWater: bool = false): Tuple
553FindPartOnRayWithIgnoreList(ray: Ray, ignoreDescendantsTable: Objects, terrainCellsAreCubes: bool = false, ignoreWater: bool = false): Tuple
553FindPartOnRayWithWhitelist(ray: Ray, whitelistDescendantsTable: Objects, ignoreWater: bool = false): Tuple
553FindPartsInRegion3(region: Region3, ignoreDescendantsInstance: Instance = Instance, maxParts: int = 20): Objects
553FindPartsInRegion3WithIgnoreList(region: Region3, ignoreDescendantsTable: Objects, maxParts: int = 20): Objects
553FindPartsInRegion3WithWhiteList(region: Region3, whitelistDescendantsTable: Objects, maxParts: int = 20): Objects
640GetPartBoundsInBox(cframe: CFrame, size: Vector3, overlapParams: OverlapParams = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): Objects
640GetPartBoundsInRadius(position: Vector3, radius: float, overlapParams: OverlapParams = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): Objects
640GetPartsInPart(part: BasePart, overlapParams: OverlapParams = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): Objects
573IKMoveTo(part: BasePart, target: CFrame, translateStiffness: float = 0.5, rotateStiffness: float = 0.5, collisionsMode: IKCollisionsMode = OtherMechanismsAnchored): null
553IsRegion3Empty(region: Region3, ignoreDescendentsInstance: Instance = Instance): bool
553IsRegion3EmptyWithIgnoreList(region: Region3, ignoreDescendentsTable: Objects): bool
638Raycast(origin: Vector3, direction: Vector3, raycastParams: RaycastParams = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): RaycastResult?
638RaycastCachedTerrain(id: string, origin: Vector3, direction: Vector3, ignoreWater: bool): RaycastResult?
573SetInsertPoint(point: Vector3, ignoreGrid: bool = false): null
638Shapecast(part: BasePart, direction: Vector3, params: RaycastParams = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): RaycastResult?
638Spherecast(position: Vector3, radius: float, direction: Vector3, params: RaycastParams = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): RaycastResult?
616StepPhysics(dt: float, parts: Objects = {}): null
553findPartOnRay(ray: Ray, ignoreDescendantsInstance: Instance = Instance, terrainCellsAreCubes: bool = false, ignoreWater: bool = false): Tuple
553findPartsInRegion3(region: Region3, ignoreDescendantsInstance: Instance = Instance, maxParts: int = 20): Objects
inherited from Model
553LevelOfDetail: ModelLevelOfDetail
553ModelStreamingMode: ModelStreamingMode
553PrimaryPart: BasePart
562Scale: float
553WorldPivot: CFrame
573AddPersistentPlayer(playerInstance: Player = Player): null
573BreakJoints(): null
607GetBoundingBox(): (CFrame, Vector3)
462GetExtentsSize(): Vector3
553GetModelCFrame(): CFrame
553GetModelSize(): Vector3
576GetPersistentPlayers(): Objects
576GetPrimaryPartCFrame(): CFrame
562GetScale(): float
573MakeJoints(): null
573MoveTo(position: Vector3): null
573RemovePersistentPlayer(playerInstance: Player = Player): null
573ResetOrientationToIdentity(): null
573ScaleTo(newScaleFactor: float): null
573SetIdentityOrientation(): null
573SetPrimaryPartCFrame(cframe: CFrame): null
573TranslateBy(delta: Vector3): null
573breakJoints(): null
573makeJoints(): null
573move(location: Vector3): null
573moveTo(location: Vector3): null
inherited from PVInstance
553Origin: CFrame
553Pivot Offset: CFrame
576GetPivot(): CFrame
573PivotTo(targetCFrame: CFrame): null
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553ClassName: string
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
553className: string
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
486GetChildren(): Objects
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
462GetPropertyChangedSignal(property: string): RBXScriptSignal
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsA(className: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
553children(): Objects
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
553getChildren(): Objects
462isA(className: string): bool
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462Changed(property: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)

Description

The WorldModel provides some physics features to a ViewportFrame.

More specifically, you can make a WorldModel a child of a ViewportFrame, and then parent geometry to the WorldModel. This will then allow you to use raycasts in the ViewportFrame through the WorldModel. Furthermore you can put Humanoid characters in the WorldModel and their joints will be set-up correctly, and you can animate them.

History 4

Settings