DatAmazingCheese

Crew Camera

Jan 11th, 2017
277
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @name Crew Camera
  2. @inputs Button Chair:entity
  3. @outputs [Position]:vector
  4. @outputs [FOV]:number
  5. @outputs [Parent]:entity
  6. @persist CamToggle Offset:vector Offset2:vector
  7.  
  8. if(first()|dupefinished())
  9. {
  10.  
  11. # Camera settings
  12. Offset = vec(0, 0.455, 52.396) # Offset Position
  13. Offset2 = vec(0, 0.455, 26.396) # Default Position
  14.  
  15. Parent = Chair
  16. Position = Chair:massCenter() + Offset
  17.  
  18. }
  19.  
  20. if( changed(Shift) & Shift)
  21. {
  22. CamToggle = !CamToggle
  23. Position = CamToggle ? Chair:toWorld(Offset2) : Chair:toWorld(Offset)
  24. Distance = CamToggle ? Dist : 0
  25. FOV = 90
  26. }
RAW Paste Data