- Home /
Unity 5.0.1 Rigidboby doesn't work
I have a script attached to an object(obj1) that makes it move back and forth, and on top of another object(obj2), when the second object(obj2) is located above the first object(obj1) does not fall, but remains suspended in the air, as I solve this problem?
So basicly your Obj2 is not falling at all or is it not falling only under certain condition?
$$anonymous$$y obj2 should always fall when it is not above obj1, as the normal gravity. But must not rotate.
Disable the script on obj1 and see if obj2 falls. If it does, the script is the source of the problem, and if so, we would need to see the script in order to help you any further.
Just to verify obj2 falls until it collides with obj1 and then stops forever (all three rotational constraints are checked). Obj1 acts normally.
With no rotational constraints checked obj2 falls until collision with obj 1 and then continues to fall after obj1 moves out of the way?
Will it still fall with just x and y rotation constraint checked?
edit:
I also just checked the unity scripting API on rigid bodies and found this: Changing the Transform while using physics could cause problems with collisions and other calculations.
Try .addforce ins$$anonymous$$d of transform.position on obj1, see if that might work?
I tried .addforce and not working.
I disabled freeze rotation Z in obj2 and everything works, but this object to fall starts rotating, so I created a new script that I assigned to obj2 with this line of code:
transform.rotation = new Quaternion(0,0,0,0);
Still not working. Obj2 it remains suspended in the air for some arcane mystery. I'm going crazy.
Your answer
Follow this Question
Related Questions
Asset Store problem 0 Answers
Mac standalone doesn't open 0 Answers
Strange physics, rigidbody, iTween activity 1 Answer
Applying force to a rigidbody 2 Answers
Problem with Animator 2 Answers