Delay when fireing

Blitz3D Forums/Blitz3D Beginners Area/Delay when fireing

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.

Your best bet is to attach a couple of children to the right bits.

2 ways of doing this.

1. Stick a bone where the gun port is, name it something like gun and then in your code do: gunport = findchild(ship,"gun")
Then you can entityx(gunport,true) to find the xcoord etc.

2. Create a sphere (later turn it into a pivot) just after loading your ship mesh. Parent it to this ship (entiyparent gunport,ship) and move it around until it's in the right place.
Once it's in the right place instead of using a sphere use a pivot.
And again, entityx(gunport,true) will find it's position.

You can use entitypitch, yaw and roll too, just make sure you used the ,true flag when finding these to have them translated into real world positions.

I would strongly recomend using the bone method as then nothing in your game is hard coded (apart from the bone names) so you can update your ship etc without having to arse around with co-ords of children.