switchLookButton
Platform Compatibility PC Mac OSX Oculus Quest X X – Switch the primary button for looking around from right-click to left-click or left CTRL key if not VR Parameters: _tf A boolean value Example: 1obj.switchLookButton(_tf)
McMaster University Virtual Reality Simulation and Research
Articles for coding in Artspark
Platform Compatibility PC Mac OSX Oculus Quest X X – Switch the primary button for looking around from right-click to left-click or left CTRL key if not VR Parameters: _tf A boolean value Example: 1obj.switchLookButton(_tf)
Platform Compatibility PC Mac OSX Oculus Quest X X X This is an example of how to clone an object with SpecialFX tag when clicking the object the script is attached to. For further reading, look at Tags, tryStore, Timers, and cloneObject! 123456789101112–Clone an object tagged with "SpecialFX" at the base of the object this … Read more Clone On Click
Platform Compatibility PC Mac OSX Oculus Quest X X X Artspark has a very simple waypoint based path system built-in, but to use it you do need to learn about waypoints, and path followers. This is an example of making an object into a waypoint using makeWaypoint: 12345–Simple waypoint starting point (0) on first path … Read more Introduction To Paths
Platform Compatibility PC Mac OSX Oculus Quest X X X Make this object attach itself to the player object, learn more about setParent for information on using this command and what it does. Note, this parents the object to the player at the offset (or distance from Player) it currently sits at, so it needs … Read more Parent To Player
Platform Compatibility PC Mac OSX Oculus Quest X X X Change the text on a click of a button. Learn more about onClick! 123function onClick(type) obj.set3DText("You Clicked Me With: " .. type) end
Platform Compatibility PC Mac OSX Oculus Quest X X – Simple two player controls, set player number, make sure there is an object in the scene with tag Alpha for player one, and Beta for player two, then two camera objects with this script on them (and either player = 1 for player one, or … Read more Splitscreen
There’s a list of materials and shaders you can load by default by calling obj.useGlobalMaterial CheckerTile GreenTile MetalPlate SolarPanel BrownLeather SheetMetal Dirt Grass Sand Copper Iron Steel WhiteGrid WhiteSquare Glass Water WaterSurface RedHaze SolidColor To create more materials at runtime, use obj.createGlobalMaterial
• Object Layers: Layers you can assign objects to Default NoCollide CollideSelf CollideOthers VROnly NonVR Terrain • Sprite sorting: Layers you can put Sprites (2D images) on Background Default Foreground UI HUD
• Special tags (read only): Tags you can look for but cannot assign to other objects VR_Head VR_Hand_Left VR_Hand_Right VR_Index_Right VR_Index_Left VRBody IsEditor RealGame Player MainCamera Camera Terrain 3DHUDCenter 3DHUDTopLeft 3DHUDTop 3DHUDTopRight 3DHUDLeft 3DHUDRight 3DHUDBottomLeft 3DHUDBottom 3DHUDBottomRight • Free to use tags: Tags you can apply to any object in the scene FindMe Enemy Special … Read more Tags
Platform Compatibility PC Mac OSX Oculus Quest X X – Add some text to the visual log, if DEBUG IS ON (on by default in Editor mode) Parameters: text A string value Example: 1obj.debugLog(text)