V
V
vari0us2015-11-16 10:34:52
C++ / C#
vari0us, 2015-11-16 10:34:52

How to make a character susceptible to gravity?

I'm studying unit3d, version 5.2.2, I made a character, added several animations to it, a character controller, the camera moves behind it, collisions work, but for some reason the character itself does not sink to the surface and does not fall down :-( I'm
interested in how to properly make him gravity so that he touches the stage with his feet and if there are no collisions under his feet, then he would fall down as it happens in most games
.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Dorofeev, 2015-11-16
@vari0us

As I understand it, you have a 2d game. Add a RigidBody2D to the character, and a Collider 2D to the ground.

V
vari0us, 2015-11-16
@vari0us

Ah, I realized that a rigidbody is definitely needed along the way, without it apparently nothing. The first time I had a problem with it, the character fell on its back like a figure :-( but I copied the scripts from the example and everything worked ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question