Having another Annoying Issue

So I am trying to create my Delivery Driver Scene and all is fine however the issue is where I add Rigid bodies to all objects to have them solid objects but I know either the objects or the player(Driver) only one of them needs the rigid body 2d and both need box collider 2ds. However if I don’t have the rigid bodies and all object they float away in the game scene but when I do have rigid bodies on all objects the player(Driver) of course just drives through the objects. what is going on please help me ASAP it is so annoying and confusing.

1 Like

I think unity is just acting up now the rigid bodies are off the other objects where I just want it on the driver and now no more floating but the player/ driver is moving to the side in play mode with out my control ahhhhh!.

1 Like

Hi,

First of all, add Rigidbody2D components only to objects that have a Collider2D and that are supposed to be moved.

If a tree flies away despite not having any Rigidbody2D attached or any script that moves it, it might be that other game objects are moving relatively to it. Some people add a Rigidbody2D to the ground. When they start the game, everything looks as if it started to move upwards but, actually, it’s just the ground falling down.

If you want to prevent the car to be affected by gravity, you could disable the gravity for the car or, if you want to disable the gravity in general in your game, you could set the gravity to 0 in the physics2D settings in Unity.

Also bear in mind that colliders push other colliders. If your car is inside another collider, that might explain your car moving to the side.

Since I do not know anything about your project except for a vague description, this is just a guess, though.


See also:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms