07-31-2011, 11:53 AM
(This post was last modified: 07-31-2011, 11:54 AM by Administrator.)
I MADE ONE USEING THE SCRIPT:
AND IT CANT WORK SO PLEASE ADMINS OR SOMEONE PLEASE FIX THIS!
Code:
function normalizeVector(vec)
local m = math.sqrt(vec.x * vec.x + vec.y * vec.y)
return Vec2D(vec.x / m, vec.y / m)
end
[..]
body = character.Body
local v = normalizeVector(Vec2D(mousepos.x - body.Position.x + 0.1, mousepos.y - body.Position.y - 1.5))
bullet.Position = Vec2D(body.Position.x - 0.1 + v.x * 7, body.Position.y + 1.5 + v.y * 7)
AND IT CANT WORK SO PLEASE ADMINS OR SOMEONE PLEASE FIX THIS!