Hardpoints

BlitzMax Forums/BlitzMax Programming/Hardpoints

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Here's a little code from my project, which I believe does exactly what you're after:

shot._x = _x + yOff * Cos(_rotation) + xOff * Sin(_rotation)
shot._y = _y + yOff * Sin(_rotation) - xOff * Cos(_rotation)


The code gives the shot initial x/y coordinates.

_x and _y and _rotation are the ship's coordinates and rotation, and yOff and xOff describe the hardpoint offset from the center of the ship.

Hope this helps.