Hello so im trying to teleport a player to another player for an ability for my game. The problem is, when the target player is moving or falling or something, the teleport position isnt exactly where the target is. Im not sure why.
Things ive tried:
Anchoring target before teleporting
trying to teleport to different body parts
What i want:
I want to player to teleport to the exact position of the target whether they are moving or not so that animations look nice and are connected properly.
The reason the position where the player teleport is not exact is due to lag . There is not really any easy way to fix it other than predicting the position.
You take the target current position
you take the target velocity
You add the position with the velocity * factor
factor should be a fraction weather whole number or not depends on your liking. You can keep tweaking the factor until it is accurate