setNodePosition.lua 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. return {
  2. summary = 'Set or blend the position of a node.',
  3. description = [[
  4. Sets or blends the position of a node. This sets the local position of the node, relative to
  5. its parent.
  6. ]],
  7. arguments = {
  8. index = {
  9. type = 'number',
  10. description = 'The index of the node.'
  11. },
  12. name = {
  13. type = 'string',
  14. description = 'The name of the node.'
  15. },
  16. x = {
  17. type = 'number',
  18. description = 'The x coordinate of the new position.'
  19. },
  20. y = {
  21. type = 'number',
  22. description = 'The y coordinate of the new position.'
  23. },
  24. z = {
  25. type = 'number',
  26. description = 'The z coordinate of the new position.'
  27. },
  28. position = {
  29. type = 'Vec3',
  30. description = 'The new position.'
  31. },
  32. blend = {
  33. type = 'number',
  34. default = '1.0',
  35. description = [[
  36. A number from 0 to 1 indicating how much of the new position to blend in. A value of 0 will
  37. not change the node's position at all, whereas 1 will fully blend to the target position.
  38. ]]
  39. }
  40. },
  41. returns = {},
  42. variants = {
  43. {
  44. arguments = { 'index', 'x', 'y', 'z', 'blend' },
  45. returns = {}
  46. },
  47. {
  48. arguments = { 'name', 'x', 'y', 'z', 'blend' },
  49. returns = {}
  50. },
  51. {
  52. arguments = { 'index', 'position', 'blend' },
  53. returns = {}
  54. },
  55. {
  56. arguments = { 'name', 'position', 'blend' },
  57. returns = {}
  58. }
  59. },
  60. related = {
  61. 'Model:getNodeOrientation',
  62. 'Model:setNodeOrientation',
  63. 'Model:getNodeScale',
  64. 'Model:setNodeScale',
  65. 'Model:getNodePose',
  66. 'Model:setNodePose',
  67. 'Model:getNodeTransform',
  68. 'Model:setNodeTransform',
  69. 'Model:animate'
  70. }
  71. }