Hey guys I’m new but I successfully managed to make a game, however I have a big issue. In fact, I would like to be able to change my character’s form in game and I can’t find how to do it. Let me explain a bit more. I used 4 basic assets : Cube, Cylinder, Triangle and Hexagon and I have a player which is a Sphere at the beginning of the game. I’d like to do so that when my Sphere goes through one of the assets it takes its form (e.g. Sphere goes through Cube and becomes a Cube then Cube goes through Hexagon and becomes Hexagon, ...). I thought I could make it with a switch as I saw someone making it in another discussion but unfortunately it doesn’t work as I have 4 forms and not just 2. I Hope you can help me, thanks.
I thought about doing something like the SetColor() function but with a SetMesh() function but it doesn’t exist. I had in mind something like : let mesh = this.attribute(‘Mesh’) this.entity().setMesh(‘Cube’) (When collides with Cube) but it’s not working. Does someone know how to create it from scratch in a script then ?
you can add ' if Collide' component in those assets, like in cube asset add 3 if collide component if collide -> asset affected -> cylinder if collide -> asset affected -> triangle if collide -> asset affected -> hexagon ... and so on....
and use global variable using Settings like Settings.variableName = 'name'; use script component and use above syntax in signal function and attach this script to if collide