decentraland / sdk

PM repository for SDK
Apache License 2.0
4 stars 4 forks source link

Raycast hits from SDK7 against SDK6 scenes #1033

Closed nearnshaw closed 9 months ago

nearnshaw commented 9 months ago

Some portable experiences and smart wearables are quite limited when it comes to interacting with the surroundings, since most scenes are with SDK6.

Ideally, I would like to be able to throw a raycast and know if it collided against something, its position, normal, etc, even if that collision is with something in an SDK6 scene.

Is this doable? Since the ray is handled by the engine, wouldn't the engine know there was a hit, regardless of what SDK version handles rendering that content?

Returning references to the hit entity or meshName is probably a no-go, as it's an SDK6 entity. But the following information sounds like it should be agnostic to the SDK version:

With that alone, we unblock a lot of use cases.

See for example the portal-ble experience, where I can currently only shoot portals against geometries in SDK7 scenes.

https://github.com/decentraland-scenes/portal-ble-experience