Hi, I’m trying to teleport a projectile from one teleport to another, by shooting into the first one. I also want the projectiles speed to be maintained when exiting the second teleporter.
This is my code:
#pragma strict
var teleportTo : Transform;
function OnTriggerEnter (col : Collider)
{
col.transform.position = teleportTo.position;
}
The projectile does indeed get teleported as wanted, but it does not keep its speed and will immediately drop to the ground. Any help would be appreciated
Create a variable that stores the value of the current speed of the projectile before the teleport, then you use this value in the AddForce rigidbody when it is teleported;)