简体   繁体   中英

Is it possible to create an invisible barrier in Ursina Engine?

Does Ursina allow for one to create an invisible barrier to prevent the player from falling off the map, if so, how could I do that, if not should I just add walls to prevent that from happening?

Yes, it is possible. You can create an entity and make it visible = False or just make it transparent (less optimized) color = color.rgba(0,0,0,0)

Here is an example:

barrier = Entity(model='cube', collider='box', visible=False)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM