#(apememadide) Approach to get a "seemless TP", preserving momentum

15 messages · Page 1 of 1 (latest)

pallid mulch
#

I have simple portals that teleport you somewhere as soon as you enter them, as a simple on player enters portal: - teleport portal.destination. It works, but causes it to be "a real teleportation". I want it to me more natural, thus preserve pitch, relative yaw, and momentum.

The pitch is simple, can just pass it directly as <[LOC].with_pitch[<player.location.pitch>]>.

The yaw should be pretty simple, tho a bit more tricky. I can know the portal's direction (east-west or north-south), and the destination location's yaw. This means I can do simple math to preserve the player's facing direction (i.e. if the player enters a portal looking 30degs to the right, I can add 30degs to the destination's yaw).

For the momentum, no clue. If the player is running in the portal, I want the player to keep on running after the teleportation.

I also don't know if Denizen is hiding some kind shortcut for that working out of the box.
Any idea on how to proceed for the momentum thing, or know a shorthand ?

pastel stumpBOT
#

(apememadide) Approach to get a "seemless TP", preserving momentum

pastel stumpBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

thorny elbow
#

!c teleport

vapid dockBOT
# thorny elbow !c teleport
Group

entity

Syntax

teleport (<entity>|...) [<location>] (cause:<cause>) (entity_options:<option>|...) (relative) (relative_axes:<axis>|...) (offthread_repeat:<#>) (offthread_yaw) (offthread_pitch)

Short Description

Teleports the entity(s) to a new location.

Description

Teleports the entity or entities to the new location.
Entities can be teleported between worlds using this command.
You may optionally specify a teleport cause for player entities, allowing proper teleport event handling. When not specified, this is "PLUGIN". See !language teleport cause for causes.

Instead of a valid entity, an unspawned NPC or an offline player may also be used.

Optionally specify "relative" to use relative teleportation (Paper only). This is primarily useful only for...

thorny elbow
#

Might be able to use the relative teleport stuff?

pallid mulch
#

Shouldn't teleport <player> 0,0,0,world_lobby relative be supposed to do nothing ?

#

It teleports me to 0,0,0

#

same for 1,1,1

#

(all locations)

thorny elbow
#

It doesn't block teleports, it just might not be as smooth over long distances - just a !tias basically

pallid mulch
#

Ye ok that indeed seems like preserving the player's momentum

#

For the yaw I used the yaw rounded to 90 minus the yaw to get a "relative direction" which i could add to the portal's destination

#

so