I have just began using Unity and have watched the videos for creating “PickUp” objects in the “Roll-a-ball” tutorial about 6-7 times to try and get all the terminology straight in my head.
So to bullet point in short what I think is correct.
- We create a cube object which has a collider mesh.
- We have used scripting to update the XYZ value of the rotation per update to create a spinning cube.
- As we want the cube to be picked up and not collided with we set it as a “Trigger” meaning it’s mesh is still present but won’t obstruct other colliders (they won’t hit).
- The scripting allows us to deactivate the game object when the player touches the cube.
Just wanted to check I was clear on these points, so please correct if not.
Now the video tutorial says due to the fact that static colliders have to be re calculated every update (due to them spinning) we ensure it is dynamic by adding a Rigidbody component. I understand why Rigidbody is used for the player sphere as it is affected by the physics engine, however it seems the cubes are just using this property to become dynamic objects, right?
The main problem is then the video then states that we can uncheck “use gravity” to ensure they hover, but it is then stated that they will still be affected by forces? So we are forced to use Kinematic to avoid this.
This is the part I don’t understand, if they are Triggers, and therefore not affected by colliders, to the point that if gravity were used they simply fall through the floor, how would it then be affected by forces? What forces? Could anyone give an example of what is meant here, as I see no difference from using no gravity and then using gravity plus kinematic? I assume if it is a trigger then how can forces ever act upon it? What is Kinematic actually doing?
EDIT: Just to restate in more clear terms, what negative affect would be caused by just unchecking “use gravity” as if it is a trigger I see no way a force could therefore act upon it.
Thanks for your help.