Posted July 30, 201213 yr Hello, I am making a mod that has a homing missile and im having trouble with the code, if someone could help me that would be GREAT. thanks in advance
July 30, 201213 yr You'll have to calculate a path to an xyz based on several datapoints. Can we see your source code? So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.
July 30, 201213 yr Hello, I am making a mod that has a homing missile and im having trouble with the code, if someone could help me that would be GREAT. thanks in advance I'm planning to add homing missiles to my mod ICBM (which is a missile mod). Coding it is fairly simple. Constantly change target to a position and that's all. On the side note, I don't suggest you to make another mod that adds explosives and stuff. There is already enough competition in this genre of mods. http://calclavia.com/uploads/banner.png[/img]
July 30, 201213 yr Author double x= (target.boundingBox.minX + (target.boundingBox.maxX - target.boundingBox.minX) / 2D) - posX; double y = (target.boundingBox.minY + (target.boundingBox.maxY - target.boundingBox.minY) / 2D) - posY; double z = (target.boundingBox.minZ + (target.boundingBox.maxZ - target.boundingBox.minZ) / 2D) - posZ; setThrowableHeading(d, d1, d2, 1F, 0.0F); i figured it out uses notch's code, was very frustrating
July 30, 201213 yr Ok. I would calculate a tragectory using something like a quadractic/cubic function, then have the missile follow that path. So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.