Classe de moteur
Workspace
*Ce contenu est traduit en utilisant l'IA (Beta) et peut contenir des erreurs. Pour consulter cette page en anglais, clique ici.
Résumé
Propriétés
Méthodes
BreakJoints(objects: Instances):() |
JoinToOutsiders(objects: Instances,jointType: Enum.JointCreationMode):() |
MakeJoints(objects: Instances):() |
UnjoinFromOutsiders(objects: Instances):() |
ZoomToExtents():() |
Événements
PersistentLoaded(player: Player):RBXScriptSignal |
Membres hérités
21 hérité du WorldRoot
26 hérité du Model
4 hérité du PVInstance
57 hérité du Instance
6 hérité du Object
Référence API
Propriétés
FilteringEnabled
Gravity
Échantillons de code
Bouton de Gravité Faible
local MOON_GRAVITY_RATIO = 1.62 / 9.81
local DEFAULT_GRAVITY = 196.2
local MOON_GRAVITY = DEFAULT_GRAVITY * MOON_GRAVITY_RATIO
-- Créer un pad tactile
local pad = Instance.new("Part")
pad.Size = Vector3.new(5, 1, 5)
pad.Position = Vector3.new(0, 0.5, 0)
pad.Anchored = true
pad.BrickColor = BrickColor.new("Vert brillant")
pad.Parent = workspace
-- Écouter le toucher du pad
local enabled = false
local debounce = false
local function onPadTouched(_hit)
if not debounce then
debounce = true
enabled = not enabled
workspace.Gravity = enabled and MOON_GRAVITY or DEFAULT_GRAVITY
pad.BrickColor = enabled and BrickColor.new("Rouge brillant") or BrickColor.new("Vert brillant")
task.wait(1)
debounce = false
end
end
pad.Touched:Connect(onPadTouched)InterpolationThrottling
PathfindingUseImprovedSearch
PlayerCharacterDestroyBehavior
PlayerScriptsUseInputActionSystemAlias
RenderingCacheOptimizations
ReplicateInstanceDestroySetting
Méthodes
BreakJoints
GetRealPhysicsFPS
JoinToOutsiders
Paramètres
objects:Instances |
Retours
()
MakeJoints
UnjoinFromOutsiders
Workspace:UnjoinFromOutsiders(objects:Instances):()
Paramètres
objects:Instances |
Retours
()
ZoomToExtents
Workspace:ZoomToExtents():()
Retours
()
Événements