Hi,
I’m looking to put a game object into a sort of “super” mode. In this mode other rigidbody-colliders bounce off the “super” rigidbody-collider without affecting its course.
However the “super” rigidbody-collider still needs to be controlled by ApplyForce of its own based on the player input. I don’t want to switch it to non-physics movement because then I will have two parallel movement systems which will need to be in sync in terms of feel.
So basically what I am looking for is similar to a kinematic rigidbody-collider, but the only problem is that the kinematic flags screws up the ApplyForce() based movement code. I’d like the physics simulation to move the object based on ApplyForce(), but during collisions it should behave like a kinematic body and be “immune” to collisions but still affect the bodies that collide with it in the normal way.
The only way I was able to achieve this was by using two game objects that are not directly related through their transform (i.e neither one is a child of the other), I set the collision between them to ignore, and then I use ApplyForce() to drive one of them (the original), and the other one I keep setting its position and velocity to that of the original.
This works but it’s somewhat hacky. I was wondering if there is a better to do it?