Before updating to Windows 10 you may need to return your Pro license. More information here

Object wont move after collision with more than one point

Hello, I am creating a 2D room where the walls are box colliders. I have an object in the room that has a box collider and a rigid body component, I am changing the gravity direction based on the accelerometer. that works, but

It seems that i cant move the player (with the box collider) after it has rested on one of the walls, or touched 2 walls, like in a corner. is it constantly in a collision loop or whats going on. i want to be able to flip the accelerometer around again and it would drop down again, but it just gets stuck. when i try to change its location programmatically to some other place where its not touching the wall, it seems to move again.

any help?

more ▼

asked May 07, 2011 at 05:12 PM

avatar image

1 3 2 2

Please post all of your code.

May 07, 2011 at 06:06 PM Tommy
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

You will need to add force in the upward direction of your box when trying to move it as it is probably getting stuck in one of the walls of your level.

Put the below in script when you press a button to move your character and it should work:

  rigidbody.AddForce (Vector3.up * 10);
more ▼

answered Jul 15, 2011 at 02:13 PM

avatar image

1 4 4 7

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: May 07, 2011 at 05:12 PM

Seen: 1457 times

Last Updated: Jul 15, 2011 at 02:14 PM