Unsolved How do I teleport with Rotation & Location?

Discussion in 'Mod Support' started by Spencer Johnson, Mar 24, 2023.

  1. Spencer Johnson

    Spencer Johnson
    Expand Collapse

    Joined:
    Jul 11, 2016
    Messages:
    297
    Hey, quick question, how am I able to teleport with both location + rotation?

    This is the script that I have to teleport the car without rotation. It works great.


    ---------------------------------------------------------
    local function teleportPlayer(data)
    local vehicleName = data.subjectName

    if data.event == 'enter' and data.subjectName ~= 'scenario_player0' then

    TorqueScript.eval(vehicleName..'.position = "42.6746483 109.390358 720.762146";')

    end
    end

    return teleportPlayer
    -------------------------------------------------------


    Though, I'm trying to get it to rotate aswell, what would I add to do this?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice