I just started leaning creating games and I just finished the first unity tutorial roll a ball ,so take it easy on me please !
1.how can I give plane object gravity so then objects like cube … don’t fall from it to the space ?(they overlap and cross from the middle of the plane object just like it doesn’t even exist ,but I want them to stay on the plan ,like the plane has it’s own gravity ,like earth !)
2.how can I create things like cars ,humans and …
3.the last one is a problem I have with unity, global mode won’t work ,when change to global from local the only things that change are it’s arrows but I can’t use the global mode ability (it goes up and down and any directions instead of just letting me move my object horizontally and vertically. ).
and
in prefab for scale property when I change the z value it won’t get applied to other instances.
I guess I’m doing some thing wrong !.
I think you don’t want the plane to have gravity — that would cause it to fall. You want the plane to stay put and for objects to not fall through it. That should happen automatically, because the plane has a collider on it.
However, an object that starts out already overlapping the plane will indeed fall through it. In real life, solid objects can’t intersect each other. Start your objects out above the plane, and then they should fall down and land on it.
Use a 3D modeling program. If you’re on a Mac, I recommend Cheetah3D. But then, since you ask this question, I know you’re not already a 3D modeler, so if you want your cars and humans to actually look good, you should plan 5-10 years building up your artistic skill. Or, just get some assets from the Asset Store. It’s awesome.
I almost never use the global/local switch, so I don’t have a lot of insight there. It’s worked for me. Regardless of which mode you’re in, you should still be able to move in 3 directions. It’s not a 2D switch (that’s a different button). I’m not really sure what you’re asking here.
The plane should just exist with a collider but not a rigid body.
If the collider is set as a trigger then things pass through it as it is expecting the trigger to fire of code so you just want it to be a normal collider.
Put the rigid body on the cube so it will have gravity, make sure it has a collider that is also NOT set as a trigger.
Make sure the cube starts completely above the plane
When you press play the cube will fall onto the plane, maybe bounce or roll a bit, & then stay there.
thanks ,you and JoeStrout helped to find where the problem is ,but now there is another problem .
I want a cube to push another cube ,normally unity would do that but it only works for a second ,
I tried using the oncollisionstay () but didn’t know what to do after that !
Raise a new question & include code, details etc. the new question will make it easier for others with similar problems to find so any answer may help them as well.
Having the code, screenshots etc will make it easier for people to help you as just saying a cube won’t move another cube doesn’t give enough info to allow anyone to help.