#Applying delta movement to entites results in "skipping" movement.

30 messages · Page 1 of 1 (latest)

gray totem
#

I'm trying to reproduce a magnet item that moves all entities on the ground in aabb to the player, got it working but the entities do not want to move smoothly, they skip like in the video.

carmine ravineBOT
#

Paste version of magnet.js from @gray totem

modern zincBOT
#

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

gray totem
#

Im just applying delta movement by .setDeltaMovement

final lynx
#

Can you try using .setMotion(x, y, z)

gray totem
#

nope, vanishes lol

final lynx
#

It probably moves too fast, try dividing the movement by something?

gray totem
#

the x,y,z correspond to the position it will move to?

final lynx
#

No

gray totem
#

oh its the vector

final lynx
#

It sets the movement vector

gray totem
#

its still skipping

#

like nothing changed

final lynx
#

That's weird

#

Can you try it on something like a zombie?

gray totem
#

ill try using just that script since I have like 20 on them, maybe something is causing the "skip"

#

will try it on zombie too

final lynx
#

There's a few performance mods out there that restrict item and arrow movements to update every few ticks rather than every tick

gray totem
#

When I add the .setDeltaMovement() to an entity manually it works smooth as butter

#

i tried running the script every 40 ticks and it still skipped

#

Its still skipping to a different entity

#

Will try tomorrow without any performace mods, however it works for a single one so maybe the for loop is causing this? Maybe someone will give it a try lol

final lynx
#

Alright

red hollow
#

now that im messing around with it i think it might just be that the item is on the ground and friction is stopping it from smoothly moving towards the player

red hollow
gray totem
#

Will do but I have no Access to PC now
It was basically a setDeltaMovement(new Vec3(0,0.1,0.1)) to the Entity i dropped on ground using the event ItemEvents.dropped - and it also had the setNoGravity(true)