Tabletop Simulator

Tabletop Simulator

View Stats:
Rodney Aug 22, 2016 @ 6:26pm
How to detach attachCameraToObject()?
hi. I want to help about attachCameraObject() on scripting.

I use attachCameraObject for locking user's camera, but I don't know how to cancel attachCameraToObject()'s effect.
I tried below (but it had no effect...):
[ol]
  • call attachCameraToObject() with no args.
  • set to nil.
  • set to player.[/ol]
< >
Showing 1-3 of 3 comments
reimu Aug 23, 2016 @ 5:29am 
You change the camera mode (3rd/1st person)
Kalbintion Jan 8, 2019 @ 7:02pm 
You may have figured this out already, or went another route, but after doing some testing myself, found the only method to detach the camera is to destroy the object, either manually or through the Object.destruct() method
BandedOtter Jul 14, 2021 @ 6:41pm 
Do the locking
  • Player['Red'].attachCameraToObject({object=getObjects()[1],vector={x=0,y=0,z=0}})

    Undo the locking
  • o = getObjects()[1].clone()
  • Player['Red'].attachCameraToObject({object=o,vector={x=0,y=0,z=0}})
  • o.destruct()
  • Player['Red'].setCameraMode("ThirdPerson")
  • Player['Red'].lookAt({position={0,0,0},pitch=80,yaw=0,distance=100})

Last edited by BandedOtter; Jul 14, 2021 @ 6:42pm
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: Aug 22, 2016 @ 6:26pm
Posts: 3