#Help with pulling a player towards a location

1 messages · Page 1 of 1 (latest)

smoky stream
#

I want to make something like this but I have no idea how to make the player actually move to the target block. I tried the push effect on a loop, I tried teleportation, nothing really worked as well as it did in the showcase. ( #showcase message )

smoky stream
#

well teleportation is choppy that's smooth

blazing moth
#

hes doing it every 1 tick

#

like very quickly

#

at small distances

#

without changing yaw and pitch

smoky stream
#

yeah

#

hmm

#

i could try making the time between teleportation slower i guess

blazing moth
#

teleporting flags

smoky stream
#

?

blazing moth
#

uh wait

smoky stream
#

mmmmmmm

blazing moth
#

or you could also do like:
set {_v} to vector from location of player to the hook location

smoky stream
#

mhm

blazing moth
#

set vector length to like 0.25

#

and every tick set velocity of player

#

normalize the vector too ig

#

if u want to

#

set velocity of player to {_v}

smoky stream
#

yeah i could try that

#

yeah i did that in my testing

#

not the vector length

blazing moth
#

to achieve better smoothness or smth you could also make the player mount smth and teleport or maybe push the mount instead

smoky stream
#

yeah but that would make the player sit it would look kinda weird from someone else's perspective

blazing moth
#

and for other stuff, you have few options

#

yeah ig you could use fake players, but we are kind of reaching the mc full potential

#

lets keep it simple lol

smoky stream
#

lol yeah

#

that's a bit overkill

blazing moth
#

just go for teleportation for now

#

get like vector between 2 locations, set yaw and pitch of the main loc the player one ofc, to the vector var

#

and teleport player maybe in front of it 0.25 blocks while moving it forward too ig

#

the variable odc

#

ofc

smoky stream
#

yeah

#

i'll try velocity first i got smth written already that i can just edit

#

wait that works really well

#

woohoo it works perfectly