#what's problem with this

1 messages · Page 1 of 1 (latest)

hearty sail
#

what's problem with this


system.runInterval(() => {
  world.getPlayers().forEach(player => {
    const ridingEntity = player.getComponent("riding")?.entityRidingOn
    if(ridingEntity?.typeId !== "minecraft:pig") return
    ridingEntity.clearVelocity()
    ridingEntity.applyImpulse(player.getViewDirection({x: 0, y: 1, z: 0}))
  })
})
mild arrow
#

player.getViewDirection doesn't take any arguments

hearty sail
mild arrow
#

remove them

#

player.getViewDirection()

hearty sail
#

1 1 1

mild arrow
#

I'm not sure what you're trying to do

hearty sail
#

I want add x and y and z

#

Manage movement

#

Like I don't want fly change to x:0