How to use Colliders / Tips
On Vket Cloud, the Unity Collider can be modified by attaching HEOComponents, which can be used for various functions not only regular wall and floor collisions. Features involving colliders include Occlusion Culling, Dynamic Loading, Click / In-Out / In-View Detection, and Physics.
How to setup Colliders
On VketCloudSDK, setting a corresponding HEOComponent to each Unity Colliders will enable it to be used in world.
See the following pages for each collider setup and details.
HEOCollider : The standard component for handling colliders.
The components below are meant to be combined with HEOCollider on use.
HEOAreaCollider : Used for triggering actions when player is in/out of the area.
HEOMeshCollider : This component is attached when using the Unity Mesh Collider on Vket Cloud.
Player floating when world only has Mesh Renderer / Mesh Collider objects
On SDK Ver12.3, there is an issue occurring when the world has objects only having Mesh Renderer, Mesh Collider, HEOMeshCollider, HEOCollider components attached, causing the player to float when enter the world.
This issue is scheduled to be fixed on the next SDK release.
Also, this issue can be avoided by adding at least a single Cube with Box Collider attached.
HEOCylinderCollider : Used for enabling Physics for the Unity Cylinder Col lider.
Note that Cylinders cannot be used other than simulating physics.
Using Colliders and Physics in Action Trigger / HeliScript
On the VketCloudSDK, Colliders can be used to detect user clicks and player going in/out areas by HEOAreaCollider to trigger actions.
For details, see Actions Overview.
Also, Colliders can be used for calling Callback functions on HeliScript, which can be applied for creating various gimmicks.
Each Callback function is described on the following pages:
- Callback - AreaCollider
- Callback - physics collision detection
- Callback - In-field collider detection
Tips: Implementing staircase colliders
When creating stairs in a world, Mesh Colliders or Box Colliders tend to cause camera shakes on stepping on, and requiring the player to jump when step height is too high. This may cause unintentional stress when walking around!
Therefore, smoother stairs can be implemented by placing a diagonal Box Collider in a slope-like manner.