#Do raycasts work with teleport duration?

1 messages · Page 1 of 1 (latest)

rustic bloom
#

If I remember correctly, display entities have a data field called "teleport_duration" or something similar. If I were to use a display entity with a teleport duration that isn't 0, would it end up in the correct place?

nimble isle
#

I think teleport duration is only visually

rustic bloom
#

I saw someone make a smooth cutscene camera with one, so I'm not certain

nimble isle
#

I would suggest trying it yourself

rustic bloom
#

I'm unfortunately unable to at the moment

#

:<

#

If someone is able to, would it be possible to test for me? If not, I can try later

keen scaffold
#

I don't really understand the raycast part of the question here. Do you mean a slowcast?

#

If so, afaik no, teleporting a display entity with a longer than 1 teleport duration will not be positioned accordingly if you run a new command at its position before it has "finished" teleporting

#

But it's been a while since I messed with it, so I encourage you to check yourself when able

rustic bloom
#

Aw.. :(

#

Hmmmm... I'll have to figure something else out ^^

#

How would I make a slowcast where a display entity moves smoothly from one position to the next?

keen scaffold
#

By doing a slowcast?

#

It's just incremental teleporting

nimble isle
#

Also, why do you want to do this?

rustic bloom
#

So I can have custom projectiles that render as items and move smoothly in incremental steps

keen scaffold
#

That's just a simple slowcast projectile, I don't understand what the problem is

#

Same as if you were using a marker

rustic bloom
#

I'm trying to move it in incremental steps of 0.1 blocks

#

(These custom projectiles move a certain number of steps per tick so that collision is better)

keen scaffold
#

Yes that's what a slowcast is

#

Do you just not know how to do a slowcast? We can answer that

#

But we don't currently understand what the actual problem is

rustic bloom
#

Hmmmmm

#

I'm fairly certain that my system already counts as a slowcast, but it would be useful to know the official description ^^

#

My main goal here is to make movement look as smooth as possible, and I'm worried that instantly teleporting an entity will make it look too choppy :<

keen scaffold
#

It's just an incremental teleport

#

You say you want it to move 0.1 blocks every tick. That's a slowcast

rustic bloom
#

No, it will do a mini-raycast every tick to move forward

keen scaffold
#

I don't know how to help you here

rustic bloom
#

I feel like I'm doing a bad job explaining 😅

#

Dw, I'll figure it out!

#

I may just give the projectile entity a teleport duration of 0 and hope it doesn't look HIGHLY jank :/