Skip to content

Contact Shadow

Updated

Soft shadow from straight above that grounds objects without any light.

Type
comp-contact-shadow
Script class
ContactShadowComponent
Per entity
One
Version
1.1.0

Read about it in Shadows: what it does, how to use it from a script, and examples.

The props the runtime declares for this component, with their defaults and accepted ranges.

Prop Default Range
blur 0 ≤ x ≤ 4
height 0.001 ≤ x ≤ 1000
opacity 0 ≤ x ≤ 1
range 0 ≤ x ≤ 1000

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(ContactShadowComponent);
if (component) log(component.props);
}