1. Go into our room.js
file and add an attachTo
function in our onJoin function right after our createACharacter
function.
code/server/rooms/room.js
g.attachTo('players', client.sessionId, {
name: 'nameTag',
x: -50,
y: -60,
type: 'text',
text: data.name
});
You can change where the name tag is created by changing the x and y values.
Download your zip, and upload it to blobbert.io, and you should be able to use the name tags!