Hello sensorsovercensors, it seems that there is not a default solution provided for integrating images directly into hotspots in the current Needle Engine documentation. However, customizing the existing hotspot.ts or creating your own component seems to be a viable way to achieve this. If you plan to create a custom component based on hotspot.ts, you can use the rich component system of Needle Engine to extend its functionality.
Here’s a basic outline of steps for creating a component that adds image functionality to hotspots:
- Define a new class that extends
Behaviour. - Add a
@serializable(Texture)field to hold the image texture. - In the
startorawakemethod, create aSpriteor aMeshwith aPlaneGeometryand apply the texture to its material. - Align and position the sprite/mesh relative to the hotspot location.
Feel free to ask if you need an example of how to implement this, and I can provide a code snippet to get you started.
1 messages left GPT 4
thread_wPGV7LofG5BN6Twf1jqYs5VE
Thanks for your feedback!