Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

# Tag Info

1

In Details, in Collision, set "Collision Presets" to "Custom..." and then set "Camera" to "Ignore":

1

This question still comes up on Google and I came up with a neat way to solve interpolating the location during a collision, so I am posting here in hopes it will help someone else stumbling here. This is based on a physics system as explained in the Gaffer on games blogs, where you have an accumulator and interpolate positions between the steps. ...

1

By default, a RigidBody will not emit a signal when it collides with another RigidBody. This is usually a good thing, as RigidBodies may collide frequently, and could fire many signals that you don't care about, negatively impacting performance. If you do care about detecting RigidBody collisions, you should set RigidBody.contact_monitor to true and ...

0

warning: I don't know any python programming but I may help you a little bit? As per your code example it seems that the only thing you are missing is the b2ContactListener which will tell you when two fixtures collide: from iforce2d: Now, we want Box2D to tell us when the contact state changes. Make a subclass of b2ContactListener and implement the ...

0

I'll take impact as "any consequence". You are talking about momentum. It is represented by a vector, its value is $MLT^{-1}$ dimensionned. It is related to mass and speed this way: $\vec p=m\vec v$ where $\vec p$ and $\vec v$ are vectors. Momentum is conserved in isolated systems (no external force applied), which is the key point to make your ...

0

It depends on how your game works. Both of your leads are correct if you just need to know what tile is under the player. Between the two, again depending on your type of game and gameplay, I'd use the one using a Raycast. TL;DR: if you organize your grid objects in a linear way (from first to last) you could easily find the cell your player is on with a ...

0

It sounds like you already understand the solution: Keep iterating. When the swept test intersects an object, reflect it, and perform a second sweep along the new direction and remaining distance. This remaining distance only decreases with each bounce (especially if you apply a small skin offset to prevent tunnelling), so this will terminate eventually. ...

0

Well, you need to know the time to collision. Then negate it from the simulation time: and pass new velocity with new time to the 2. So you will check the collisions along the reflection vector and still simulate collisions until the simulation time is 0. The step 2 should look like: while (time >= some_tiny_epsilon_as_close_as_possible_to_zero) { ...

Top 50 recent answers are included