# Tag Info

Accepted

### How to make sure spinning objects hit a target with the right end?

Fake it Look at the video you linked, watch it in slow motion... eh, what is that? The camera jumps at the end, and the knife is already in the helmet of the target. Just fake it. Once the distance ...
• 27.2k

### How to make sure spinning objects hit a target with the right end?

If you know ahead of time where the knife will land - like in those kill cam footage, which is most definitely produced after-the-fact - just calculate the right rotation speed based on flight ...
• 14.8k

### How to make sure spinning objects hit a target with the right end?

Calculate the straight line distance to target. Each Frame set the angle of the knife to be 2PI*(remainingStraightLineDistance)/(originalStraightLineDistance)*DesiredNumRotations. The spin ratio will ...
• 556
Accepted

### Determining the first future intersection possible between ships and a planet

I don't think a purely analytical solution to this is possible. Any way we slice it, we have part of the problem in polar coordinates and another part in cartesian coordinates. So we end up trying to ...
• 135k

### How to make sure spinning objects hit a target with the right end?

Real throwing-knifes are designed to have a very high chance of hitting blade-first. Design your knives accordingly. Collection of throwing knives from Wikipedia: You want the center of mass, and ...
• 141

### 2D moving sprites collision

Check out this source. I wrote the code below based off of it to make it more friendly for a C# application. This works with convex polygons as well which might be a little overkill for you, ...
• 783

### How to make sure spinning objects hit a target with the right end?

For a "smoke and mirrors" way, you can have the center of rotation of the knife (i.e. the center of mass) near to the handle (i.e. non-pointy part). This way, if the rotation speed is high enough ...
• 121
1 vote
Accepted

### Collision avoidance not only AI wrong

I found out logical mistake, I should do the sum of angles as totalAngle and then divide it by the count of angles so I get ...
• 243
1 vote
Accepted

### Ensure a path always exists between moving objects

Note: I am not looking for any type of cooked solution, just some references to existing algorithms, implementations,... to look into by myself. A noteworthy algorithm here is Velocity_obstacle. Its ...
• 2,581
1 vote

### Wall sliding in JavaScript; works, but gets stuck at corners

You're not handling line endpoints correctly. Consider only a single line segment. The collision of a circle at the endpoint of a single line segment should be rounded, right? Like, if you trace out ...
1 vote
Accepted

### Dodge different type of obstacles

I made it :D Using A* with time dimension. Creating the obstacle paths just one time, on cast. Then i simply do A* and on neighbor check i check for the time the spot would have as well, if a spot is ...
• 161
1 vote

### Collision detection in Arkanoid-like game at intersections

I'd recommend thinking of your blocks as a regular grid, with a fixed spacing horizontally & vertically. We'll use componentwise division to divide these spacing parameters out of both our ...
• 135k
1 vote

### Collision detection in Arkanoid-like game at intersections

Solution 1 is to set your game in a universe of discrete pixels. Solution 2 is to include the decimals of the right and underneath the blocks in the blocks area. Let's say this is one block: It is ...
1 vote

### 2d Rectangle Collision Resolution: Find rollback point

What you're looking for is called swept or dynamic AABB collision detection. When dealing with a static and a dynamic (moving) object, you need to take the velocity of the latter in both x and y axes ...
• 14.9k
1 vote

### How to make sure spinning objects hit a target with the right end?

Perfect knife thrower? At the moment, you say you are spinning the knife through animation. What parameter are you using to control the angle? Frame number? Game time? Scaled by an arbitrary spin ...
• 119
1 vote

### Java 2D Game: Collision help

Ok, I finally found the solution! I made a hitbox for the x-axis so the x wouldn't interfere with the y. (by subtracting 10 from the y and 20 from the height) Now collisions are working abosolutely ...
• 27
1 vote

### 2D moving sprites collision

You just need to compare sidelines. These are the algebraic representations of vertical or horizontal lines. Note, this will return only the current value, not what will be, but from here is only one ...
• 111

Only top scored, non community-wiki answers of a minimum length are eligible