🧮Expressions
Expressions retrieve data from your 3D scene and return values that can be used in Construct 3 events. They're perfect for getting positions, rotations, scene information, and more.
Object
Is Object Loaded
objectCheck whether object is loaded.
Parameters
Construct 3 Usage:
MakeIt3D.IsObjectLoaded("hero")Example:
If MakeIt3D.IsObjectLoaded("hero") Then Log "Hero is ready!"Get Position X
objectGet X position of object of Id.
Parameters
Construct 3 Usage:
MakeIt3D.PositionX("objectId")Example:
Log MakeIt3D.PositionX("hero")Get Position Y
objectGet Y position of object of Id.
Parameters
Construct 3 Usage:
MakeIt3D.PositionY("objectId")Example:
Log MakeIt3D.PositionY("hero")Get Position Z
objectGet Z position of object of Id.
Parameters
Construct 3 Usage:
MakeIt3D.PositionZ("objectId")Example:
Log MakeIt3D.PositionZ("hero")Get Rotation X
objectGet X rotation of object of Id in degrees.
Parameters
Construct 3 Usage:
MakeIt3D.RotationX("objectId")Example:
Log MakeIt3D.RotationX("hero")Get Rotation Y
objectGet Y rotation of object of Id in degrees.
Parameters
Construct 3 Usage:
MakeIt3D.RotationY("objectId")Example:
Log MakeIt3D.RotationY("hero")Get Rotation Z
objectGet Z rotation of object of Id in degrees.
Parameters
Construct 3 Usage:
MakeIt3D.RotationZ("objectId")Example:
Log MakeIt3D.RotationZ("hero")Get Scale X
objectGet X scale of object of Id.
Parameters
Construct 3 Usage:
MakeIt3D.ScaleX("objectId")Example:
Log MakeIt3D.ScaleX("hero")Get Scale Y
objectGet Y scale of object of Id.
Parameters
Construct 3 Usage:
MakeIt3D.ScaleY("objectId")Example:
Log MakeIt3D.ScaleY("hero")Get Scale Z
objectGet Z scale of object of Id.
Parameters
Construct 3 Usage:
MakeIt3D.ScaleZ("objectId")Example:
Log MakeIt3D.ScaleZ("hero")Animation
Get Object Animations
animationReturns all animations of object if it has any
Parameters
Construct 3 Usage:
MakeIt3D.GetObjectAnimationsArray("Id")Example:
Log MakeIt3D.GetObjectAnimationsArray("hero")Get Object Animation Count
animationReturns the number of animations associated with a given object.
Parameters
Construct 3 Usage:
MakeIt3D.GetObjectAnimationCount("Id")Example:
Log MakeIt3D.GetObjectAnimationCount("hero")Get Object Animation Duration
animationReturns the duration of the specified animation from an object.
Parameters
Construct 3 Usage:
MakeIt3D.GetObjectAnimationDuration("Id", 0)Example:
Log MakeIt3D.GetObjectAnimationDuration("hero", "Idle")Get Current Animation Name
animationReturns the name of the current animation in a foreach loop context.
Construct 3 Usage:
MakeIt3D.GetCurrentAnimationName()Example:
Log MakeIt3D.GetCurrentAnimationName()Get Current Animation Duration
animationReturns the duration of the current animation in a foreach loop context.
Construct 3 Usage:
MakeIt3D.GetCurrentAnimationDuration()Example:
Log MakeIt3D.GetCurrentAnimationDuration()Raycast
Raycast Hit X
raycastReturns the X coordinate of the 3D point where the last raycast hit occurred.
Construct 3 Usage:
MakeIt3D.RaycastHitX()Example:
Log MakeIt3D.RaycastHitX()Raycast Hit Y
raycastReturns the Y coordinate of the 3D point where the last raycast hit occurred.
Construct 3 Usage:
MakeIt3D.RaycastHitY()Example:
Log MakeIt3D.RaycastHitY()Raycast Hit Z
raycastReturns the Z coordinate of the 3D point where the last raycast hit occurred.
Construct 3 Usage:
MakeIt3D.RaycastHitZ()Example:
Log MakeIt3D.RaycastHitZ()Raycast Hit Normal X
raycastReturns the X component of the surface normal at the 3D point where the last raycast hit occurred.
Construct 3 Usage:
MakeIt3D.RaycastHitNormalX()Example:
Log MakeIt3D.RaycastHitNormalX()Raycast Hit Normal Y
raycastReturns the Y component of the surface normal at the 3D point where the last raycast hit occurred.
Construct 3 Usage:
MakeIt3D.RaycastHitNormalY()Example:
Log MakeIt3D.RaycastHitNormalY()Raycast Hit Normal Z
raycastReturns the Z component of the surface normal at the 3D point where the last raycast hit occurred.
Construct 3 Usage:
MakeIt3D.RaycastHitNormalZ()Example:
Log MakeIt3D.RaycastHitNormalZ()Raycast Hit Object ID
raycastReturns the app-specific ID of the object that was hit by the last raycast.
Construct 3 Usage:
MakeIt3D.RaycastObjectId()Example:
Log MakeIt3D.RaycastObjectId()Raycast Hit Object Name
raycastReturns the name of the object that was hit by the last raycast.
Construct 3 Usage:
MakeIt3D.RaycastObjectName()Example:
Log MakeIt3D.RaycastObjectName()Raycast Hit Distance
raycastReturns the distance from the camera to the point where the last raycast hit occurred.
Construct 3 Usage:
MakeIt3D.RaycastDistance()Example:
Log MakeIt3D.RaycastDistance()Raycast UV U
raycastReturns the U (horizontal) texture coordinate at the raycast hit point, if available.
Construct 3 Usage:
MakeIt3D.Raycast_UV_U()Example:
Log MakeIt3D.Raycast_UV_U()Raycast UV V
raycastReturns the V (vertical) texture coordinate at the raycast hit point, if available.
Construct 3 Usage:
MakeIt3D.Raycast_UV_V()Example:
Log MakeIt3D.Raycast_UV_V()Raycast Face Index
raycastReturns the index of the triangle face that was hit, if available.
Construct 3 Usage:
MakeIt3D.RaycastFaceIndex()Example:
Log MakeIt3D.RaycastFaceIndex()Raycast Hit JSON
raycastReturns the full raycast hit data as a JSON string, including position, distance, object ID, and more.
Construct 3 Usage:
MakeIt3D.RaycastHitJSON()Example:
Log MakeIt3D.RaycastHitJSON()Utility
RGB
utilityCreate a color from RGB values (0-255).
Parameters
Construct 3 Usage:
MakeIt3D.RGB(255, 0, 0)Example:
SetColor MakeIt3D.RGB(255, 100, 50)RGBA
utilityCreate a color from RGB values (0-255) with Alpha (0-255).
Parameters
Construct 3 Usage:
MakeIt3D.RGBA(0, 255, 0, 128)Example:
SetColor MakeIt3D.RGBA(0, 255, 0, 128)Vector3
utilityReturns a vector3 object with x, y, z values.
Parameters
Construct 3 Usage:
MakeIt3D.Vector3(1, 2, 3)Example:
MoveObject "hero" to MakeIt3D.Vector3(0, 5, 0)Array
utilityCollects all passed arguments into a single array. Useful for variadic inputs.
Construct 3 Usage:
MakeIt3D.ToArray("a", "b", "c")Example:
Log MakeIt3D.ToArray(1, 2, 3)Build Uniforms
utilityReturns a uniform from given string of uniforms.
Parameters
Construct 3 Usage:
MakeIt3D.ShaderUniforms("time: 1.0; color: [1, 0, 0]")Example:
ApplyShader Uniforms: MakeIt3D.ShaderUniforms("uColor: [1, 1, 1]")Get Last Error Message
utilityGet the last error message.
Construct 3 Usage:
MakeIt3D.GetLastErrorMsg()Example:
Log MakeIt3D.GetLastErrorMsg()Usage Guidelines
Return Types Guide
- 🔢 Number - Numeric values (positions, rotations, counts, distances)
- 📝 String - Text values (object IDs, file paths, error messages)
- ✓ Boolean - True/false values (loaded states, visibility checks)
- 📋 Object - Complex data structures (rarely used)
Best Practices
- Cache Values - Store frequently accessed expressions in variables
- Use in Comparisons - Perfect for System Compare conditions
- Update Displays - Great for updating UI text with real-time data
- Performance - Expressions are fast but avoid calling them every tick unnecessarily
Common Patterns
// Update UI with object position
Every Tick -> Set Text to "X: " & MakeIt3D.GetObjectPositionX("player")
// Check distance for gameplay
System Compare: MakeIt3D.GetDistanceBetween("player", "goal") < 2
-> Go to next layout
// Monitor performance
MakeIt3D.GetFPS() < 30 -> Enable performance mode