#how to turn a Vec2 into 2 ints

13 messages · Page 1 of 1 (latest)

remote portal
#

my code rn is: js let angle = String(player.getRespawnAngle()).split('.') let yaw = Number(angle[0]) let pitch = Number(angle[1])
console.log(player.getRespawnAngle()) returns 0.0, but console.log(String(player.getRespawnAngle())) returns 0, so angle[1] is NaN

mossy elmBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

remote portal
#

how to turn a Vec2 into 2 ints

#

also, player.getRespawnAngle().split('.') doesnt work since player.getRespawnAngle() isnt a string

modest tiger
#

getrespawnangle is a float, it's one number, not two

remote portal
#

what

#

OH

#

i understand

warm birch
#

I think respawnAngle only makes player to face which direction when respawning

#

Not setting pitch

remote portal
#

then ill just ignore that

#

thx ig