Skip to content
TREN
Atlıhan Harita

LCC for Web User Manual · API Reference

LCCObject::hasCollision

Chapter 06.10 / 07Manual version v0.6.4English

Queries whether the current LCC model contains collision data.

If collision data is available, the collision detection methods (intersectsRayExt, intersectsRayFromOriginExt, intersectsSphere, intersectsCapsule) become usable, enabling features such as digital human collision detection.

Version Requirement

SDK v0.4.1+

Engine Support

Three.js

API

LCCObject::hasCollision(): boolean

Parameters

None

Return Value

boolean — true indicates collision data is available and collision detection methods can be used; false indicates no collision data.

Usage Example

const ret = lccObject.hasCollision();
if (ret) {
    console.log('Collision function available');
} else {
    console.log('Collision function is not available');
}

Notes

  • This method must be called after the success callback of LCCRender.load() has been triggered.
  • The SDK only loads collision data within the vicinity of the camera position.
  • LCCObject::intersectsRayExt()
  • LCCObject::intersectsRayFromOriginExt()
  • LCCObject::intersectsSphere()
  • LCCObject::intersectsCapsule()

This chapter is from the official XGRIDS user manual. Official source (opens in a new tab) · Updated:

XGRIDS Türkiye

We're With You During Setup and in the Field

Atlıhan Harita provides training and technical support for device setup, firmware updates, software use, and field applications. Send us your question and our specialist will get back to you.

+90 216 546 0804