OpenBlocks

OpenBlocks

56M Downloads

Cannon pointing maths

mikeemoo opened this issue ยท 5 comments

commented

@nevercast was playing with this, but I think he's losing brain cells from it.

We've replaced EntityItem with our own class that doesn't include air resistance, so in theory it should be easier to implement one of the equations out there, however no success yet.

http://physics.stackexchange.com/questions/27992/solving-for-initial-velocity-required-to-launch-a-projectile-to-a-given-destinat

This looks promising (including followup comments), however I'm not brainy enough to implement it

commented

It's okay ish at short ranges at the moment, the error grows based on displacement. So likely a calculation being excluded somewhere. Will look in to this more when it's not 5am.

commented

It did just occur to me that air resistance in a function of distance over time scaled by velocity would be v * r^dT. But life is just easier without air resistance.

commented

Then do it without, since Minecraft air has no resistance.

commented

Much improved this morning, still slight issues with the y axis. But accuracy on a flat plain is very good

commented

You don't know Minecraft do you.
Minecraft HAS air resistance, It's 2% /tick