Hi,
I am very new to adventure creator and programming in general. I am planning to make a 2d Game and I followed the tutorial but I don't want to move point and click but with the keyboard and a controller.
I know the navmesh wont work for this, and I have to use the 2d colliders.
I added both a Rigidbody 2D and a Box Collider 2D to the player. However I am having problems with the collisions, sometimes it collides, sometimes it bounces and rotates.
I found out that the Player's 2D collider is rotating as I move up and down, and if I move left or right it it rotates in a way that the collider dissappears
Without moving, the Box collider 2D is there.
The collider 2d is rotated and not visible. Does not collide.
Is there a way to make the player not rotate when I move? Or should I be using 3d colliders instead?
Comments
You should first replace your Box Collider 2D with a Circle Collider 2D - the box is better suited to the "click area" for Hotspots. Make sure that Is Trigger is unchecked, and that Ignore gravity? is checked in your Player Inspector.
You should find that the included 2D demo player, Brain2D (/Assets/AdventureCreator/2D Demo/Resources), is able to work in this manner. Try disabling your current player and drag Brain2D into the scene to confirm he works the way you intend. Assuming he does, you can then compare the two player prefabs to see the difference.
So, you were right the problem was the Box Collider 2D I was using. Because the Box Collider 2D is basically a "sheet of paper" when it was rotating to 90 degrees in the Y axis it disappeared.
Btw, I was using AC version 1.51d but I just updated to AC 1.51e today, and .Unity 5.3.4f1