• Studio

  • Studio API

  • Bots

  • Web API

  • Designer Resources

  • Host Resources

  • Globals

    QuaternionValue

    Inherits from:

    QuaternionValue class stores a single Quaternion value (3D rotation), extending from Class.Value. It's designed for synchronizing rotation data across all clients in a networked environment, such as object rotations, camera orientations, or character facing directions. IMPORTANT: Values should be changed on the server side. The Changed event should be connected on the client side to receive updates. NOTE: You can optionally pass a player object as the third parameter to associate the value with a specific player. Alternatively, you can concatenate the player ID to the name: "ValueName" .. tostring(player.id)

    Properties

    value

    ClientAndServer

    Represents the synchronized Quaternion value. Changes trigger notifications across clients via the Value.Changed event.

    local rotation = QuaternionValue.new("Rotation", Quaternion.identity)
    rotation.value = Quaternion.Euler(0, 45, 0) -- Syncs to all clients
    print("Rotation: " .. tostring(rotation.value))
    

    Updated 13 days ago

    PocketWorlds Icon

    © 2025 Pocket Worlds. All rights reserved.