Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function action_sound2d:get_source_positions ()
- local actor = db.actor
- local dir = actor:direction ()
- dir.x = 0.0
- local dir_left = vector_rotate_x (dir, 90)
- local dir_right = vector_rotate_x(dir, -90)
- dir_left:normalize ()
- dir_right:normalize () --ðàññ÷èòàåì âûñîòó
- local pos = actor:position ()
- pos.x = pos.x + 1.5 --this seems to position form player. + = to the left
- local pos_l = pos
- return pos_l:add (dir_left:mul (0)), pos:add (dir_right:mul (0))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement