#physics objects move through basket

1 messages · Page 1 of 1 (latest)

gray oak
#

I am struggling with the physics engine right now. In our game we need a basket to be able to pick up physics objects. Right now I am doing the basket as a kinematic body with a mesh collider but when moving it the physics object just move out of the basket. I tried messing around with the interpellation and continues collision but it didn't work. I also tried with multiple box colliders but it also did not fix anything.

does anyone with more knowledge on the physics engine have any idea what's going on?

#

trying to upload a video but seamingly can't in this server for some reason

tame charm
#

Tunnelling is happening because the object are moving faster that the bag can detect! If You already tried modifying the collision detection, the next thing you can do is clamp the speed of the rigidbodies or increase the solver rate in the physics settings

native peak
# gray oak I am struggling with the physics engine right now. In our game we need a basket ...

It seems the only continuous collision detection mode that works for kinematics is the ContinuousSpeculative mode. That has some issues too but you may try that. Just make sure to move the object via rb.MovePosition. If that does not give satisfactory results, I would consider making it into a dynamic object instead the only problem being that non-convex mesh colliders won't work on it anymore (also MovePosition should only be used for kinematic bodies). Making the shape out of multiple primitives or convex colliders is often the best option there

daring bobcat
tidal dragon
#

show code

daring bobcat
#

@gray oak

modest willow
#

they give you image/video perms manully

obtuse magnet
#

done

gray oak
#

Nvm I fixed it although in quite a complicated way. I isolated the physics in the basket from the rest of the scene using a physics scene. I then apply the necessary forces on the objects in the basket manually based on the movement.

It works pretty well and it gives me more control on how I want the objects to move

gray oak