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
648ArePartsTouchingOthers(partList: Instances, 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?
648BulkMoveTo(partList: Instances, 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
648FindPartOnRayWithIgnoreList(ray: Ray, ignoreDescendantsTable: Instances, terrainCellsAreCubes: bool = false, ignoreWater: bool = false): Tuple
648FindPartOnRayWithWhitelist(ray: Ray, whitelistDescendantsTable: Instances, ignoreWater: bool = false): Tuple
648FindPartsInRegion3(region: Region3, ignoreDescendantsInstance: Instance = Instance, maxParts: int = 20): Instances
648FindPartsInRegion3WithIgnoreList(region: Region3, ignoreDescendantsTable: Instances, maxParts: int = 20): Instances
648FindPartsInRegion3WithWhiteList(region: Region3, whitelistDescendantsTable: Instances, maxParts: int = 20): Instances
648GetPartBoundsInBox(cframe: CFrame, size: Vector3, overlapParams: OverlapParams = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): Instances
648GetPartBoundsInRadius(position: Vector3, radius: float, overlapParams: OverlapParams = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): Instances
648GetPartsInPart(part: BasePart, overlapParams: OverlapParams = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): Instances
573IKMoveTo(part: BasePart, target: CFrame, translateStiffness: float = 0.5, rotateStiffness: float = 0.5, collisionsMode: IKCollisionsMode = OtherMechanismsAnchored): null
553IsRegion3Empty(region: Region3, ignoreDescendentsInstance: Instance = Instance): bool
648IsRegion3EmptyWithIgnoreList(region: Region3, ignoreDescendentsTable: Instances): 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?
648StepPhysics(dt: float, parts: Instances = {}): null
553findPartOnRay(ray: Ray, ignoreDescendantsInstance: Instance = Instance, terrainCellsAreCubes: bool = false, ignoreWater: bool = false): Tuple
648findPartsInRegion3(region: Region3, ignoreDescendantsInstance: Instance = Instance, maxParts: int = 20): Instances
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
648GetPersistentPlayers(): Instances
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
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
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
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: 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
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

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