Questions tagged [collision-resolution]
A process of adjusting game objects position after collision.
434 questions
1
vote
0
answers
73
views
how to implement the vines in animal well
the vines in animal well display pixel perfect deformation when the pc moves through them. they also display rope physics but do not appear to be implemented by jointed segments of physics rigidbodies ...
1
vote
1
answer
208
views
Collision detection and physics in a 2d pixel platformer
I'm reworking physics in a 2d action platformer I'm developing (no engine, c++ / sdl). Here's the general movement logic for all characters:
I calculate the offset I need to apply to the character
I ...
0
votes
1
answer
56
views
How to calculate a fixed reflected direction from a face (or plane) whatever the incident angle or direction
In my collision protocol when a hit is found I’m using AABB faces to determine a reflected direction where the mobile must move (see picture left). This is easy as we just need to invert the sign of ...
1
vote
0
answers
107
views
How to Prevent Character Controller Descent at Platform Edges When Using a Capsule Collider
CONTEXT: I am implementing a basic 3D character controller from scratch in Unity. For collisions, I do a capsule cast in the direction of the player velocity and use the collide and slide algorithm to ...
1
vote
1
answer
89
views
2D Square Collision Correction issue detecting which direction
I've just started getting into 2D game development and have been experimenting with some 2D collision and correction logic in canvas. I'm trying to debug this block of code and understand why it is ...
0
votes
0
answers
97
views
Collision of two rigid spheres with spin
I'm trying to create a particle simulation (solar system kind). Until now my particles have no spin so the collision is rather simple
...
1
vote
0
answers
73
views
Applying impulses simultaneously at each contact point or sequentially?
I'm coding a 2d physics engine in python, and I'm struggling to understand the right way to implement collision resolution when there are multiple contact points.
Consider a very simple collision case ...
0
votes
1
answer
151
views
Object collision and vector reflection for complex polygons?
I am currently creating an environment to train aim-bot AI's for my game. It is a 2d world made of complex polygons, and the goal is to have the AI's shoot ricocheting bullets. Using a ray-casting ...
0
votes
1
answer
97
views
Circle to Polygon & Circle to Circle Velocity Resolution
I am working a 2d physics engine.
Polygon to polygon collision and velocity resolution works without issue, but I am struggling to get working circle to circle and circle to polygon velocity working ...
0
votes
0
answers
104
views
Is it possible to create an actual working physics-based ball bearing in Roblox engine?
Will it allow for making actual wheels, gears and roller coasters?
0
votes
1
answer
165
views
Bounding Box/Rectangle collision glitches
I've been working on this golf game for a couple of weeks and have been trying to create a reliable collision system for whenever a golf ball (mini golf) hits a block. I'm using regular rectangular ...
1
vote
0
answers
76
views
Separating axis theorem implementation results in limitless extending colliders along the Z axis
I am trying to implement SAT and it works except for the fact that colliders extend infinitely along the Z axis and I can never get past them. I also have confirmed that ...
3
votes
1
answer
357
views
How to make a CharacterBody2D slide out of StaticBody2D instead of teleporting?
I am trying to replicate Mario Maker's On/Off switches in Godot 4.1.
In my current version, if the player got stuck inside the block after it was toggled on, the player just teleports out it. I know ...
4
votes
1
answer
1k
views
Character controller that can handle sloped terrain and boxy ledge traversal
I am working on a character controller for a 3D platformer in Unity. I cannot find an approach that satisfies me.
I have experimented with these approaches in order to learn about their virtues and ...
1
vote
1
answer
91
views
Player stays grounded when jumping at the side of a two tile high wall
I am currently developing a simple Super Mario Bros. like platformer in Cocos2d-x v2. I am now at the step of doing wall sliding with two axis-aligned bounding boxes (tiles) but I've not quite found ...
0
votes
1
answer
75
views
How can I prevent my ball from slowing down when it makes contact with the corners of colliders
I'm trying to make a game where the player has to destroy blocks. But when the player collides with the corners of the blocks, the player's velocity slows down, or even stops.
How can I ignore the ...
0
votes
0
answers
67
views
Calculate direction to push player away from wall
I'm trying to write a common 2D game and using vectors for physics.
I have 1 wall and 1 player object that can move diagonally (both are squares without rotation).
When the player object collides with ...
0
votes
0
answers
171
views
Why do my VR avatar's hands clip through my chair object?
I have spent hours on this task and I feel it's high time I asked. My avatar hands go into my chair GameObject.
I added a box collider to the hands of my avatar and unchecked "Is Trigger". I ...
0
votes
0
answers
98
views
Motion of a cube after it bounces off a floor
I am trying to simulate what happens when a cube hits the floor after free fall. I am considering a situation in which cube hits the floor with its edge. There is obviously reaction force from the ...
0
votes
1
answer
540
views
How do you resolve continuous collision in a multi body system?
I've been trying to figure this out for weeks but every resource only provides answers for a single body. As far as I can tell for a single body you
Find the time of impact
Step up to that time
...
0
votes
1
answer
426
views
How to stop player when they hit an axis aligned bounding box?
I'm in the process of creating a game using electron and HTML5. It's going to be a pretty basic story-based platformer, but I'm ...
0
votes
0
answers
339
views
Rigid Body is rolling/spinning on collision, is there a way to have it slide on surfaces instead?
I have a rigid body with a sphere as a collision mesh which can move and rotate freely. It realistically spins when colliding with other objects, but this is annoying from a gameplay standpoint. Is ...
2
votes
1
answer
419
views
Transferring linear momentum to angular momentum in Godot
In Godot, when a 2D rigid body collides with another body, it seems that the force is absorbed/used to bounce back, but it doesn't give an "angular impulse" to the object, for instance if a ...
0
votes
1
answer
731
views
How to allow a CharacterController to pass through walls?
I'm developing a game in which bot-controlled billboards pursue you.
If the bot gets stuck behind a wall for a while, not able to catch the player, I want the bot to pass through the wall.
I'm using a ...
1
vote
0
answers
20
views
numeric inaccuracy collision resolution [duplicate]
I need an idea, please :). I've implemented moving AABB -> AABB collision detection (3D), returning the time of impact.
When I calculate time_of_impact * velocity...