Thanks good to know, thanks TogFox
Search found 3 matches
- Thu Aug 25, 2022 2:34 pm
- Forum: Support and Development
- Topic: How can I spawn bullets at a weapons barrel [SOLVED]
- Replies: 4
- Views: 2243
- Thu Aug 25, 2022 2:33 pm
- Forum: Support and Development
- Topic: How can I spawn bullets at a weapons barrel [SOLVED]
- Replies: 4
- Views: 2243
Re: How can I spawn bullets at a weapons barrel
Welcome. Now I have tried to multiple the guns x and y with math.cos/sin with the guns angle but the I have not been able to get it to work That is the correct approach. Should be something like: pink.x = green.x + cos(gunAngle) * gunLength pink.y = green.y + sin(gunAngle) * gunLength (depending ho...
- Wed Aug 24, 2022 6:01 pm
- Forum: Support and Development
- Topic: How can I spawn bullets at a weapons barrel [SOLVED]
- Replies: 4
- Views: 2243
How can I spawn bullets at a weapons barrel [SOLVED]
First time posting so apologies if I mess anything up. picture.PNG The highlighted green part is where the gun is attached to the player, it rotates around this point using: math.atan2(y2-y1,x2-x1) This is all great however when I create a bullet I want to to be where the pink is. Now normally I wou...