Source Academy Modules
    Preparing search index...

    Function createWall

    • Creates a wall. This function is a wrapper around createCuboid.

      The returned Cuboid object is designed to be added to the world using addControllerToWorld.

      This is a Controller function and should be called within init_simulation.

      Parameters

      • physics: Physics

        The physics engine of the world. See createPhysics

      • renderer: Renderer

        The renderer engine of the world. See createRenderer

      • x: number

        The x position of the wall

      • y: number

        The y position of the wall

      • width: number

        The width of the wall in meters

      • length: number

        The length of the wall in meters

      • height: number

        The height of the wall in meters

      Returns Cuboid

      Cuboid