Advertisement
Daemonion

Untitled

Aug 27th, 2012
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. function action_sound2d:get_source_positions ()
  2. local actor = db.actor
  3. local dir = actor:direction ()
  4. dir.x = 0.0
  5. local dir_left = vector_rotate_x (dir, 90)
  6. local dir_right = vector_rotate_x(dir, -90)
  7. dir_left:normalize ()
  8. dir_right:normalize () --ðàññ÷èòàåì âûñîòó
  9. local pos = actor:position ()
  10. pos.x = pos.x + 1.5 --this seems to position form player. + = to the left
  11. local pos_l = pos
  12. return pos_l:add (dir_left:mul (0)), pos:add (dir_right:mul (0))
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement