#how do i (make a projectile) aim where my mouse is?
30 messages · Page 1 of 1 (latest)
Replace {activeItemAnimation.ownerAimPosition()} with activeItem.ownerAimPosition()
Also, you can just replace {mcontroller.xPosition(), mcontroller.yPosition()} with mcontroller.position()
thanks ima try it
ok its now firering but its (fire) angle dosent change when i move my mouse
oh wait
that doesn't work
Try world.distance(activeItem.ownerAimPosition(), mcontroller.position())
nice this works (if i chage the speed to negitive)
I edited it
Do you have mcontroller.position() followed by activeItem.ownerAimPosition()?
in the table you showed me?
Did you put this?
world.distance(activeItem.ownerAimPosition(), mcontroller.position())
or this?
world.distance(mcontroller.position(), activeItem.ownerAimPosition())
i have the 2nd one
Put the first one
k
It should point toward your cursor without using negative speed
it does thanks
No problem 👍
also is there any way i could make it deviate a little like bullet spread
mainly like just like + or - 1 degres whatever direction
This'll require a little bit of digging
k
Use vec2.rotate(world.distance(activeItem.ownerAimPosition(), mcontroller.position()), sb.nrand(inaccuracy, 0))
You will need to add the line require "/scripts/vec2.lua" at the beginning of your Lua script though
thanks a lot for the help it now has in acuracy and aiming n stuff