Search Unity

Where to Start With Collision?

Discussion in 'Physics' started by GravityGamesInteractive, Dec 27, 2015.

  1. GravityGamesInteractive

    GravityGamesInteractive

    Joined:
    Apr 5, 2014
    Posts:
    13
    Apologies with the really newbie questions, but I really have no clue where to start. Google searching hasn't really netted me any good results on where to start researching and what types of collisions I should use or...anything really, so I'm hoping that someone can point me in the right direction.

    I'm trying to port a game from my own 3D game engine to Unity, as I am currently unable to figure out how to get rendering to properly work on Linux. The game I am trying to port is a 2.5D platformer. I currently have gotten graphics rendering down to the same level that I had in my own engine, but I am struggling with collisions, very hard. Simply put, I have no clue where to start with them. I have no idea which way I should be handling them for my game, both for terrain collision detection and for attacks. In my own engine, I've been handling collisions via tiles in a 2D byte array, which are then divided into chunks of 32x32 tiles for collision detection and rendering purposes, with chunks outside of the screen no longer being rendered. However, I am not sure if Unity has a more elegant solution. Furthermore, I do know (and it's about the only thing I know) that I must use 3D collision detection rather than 2D detection, because despite the player being constrained to a 2D axis, I know I wish to have some props that rotate in 3D and interact with the player and enemies accordingly. I also know that I need to be able to generate triggers for attacks on the fly and destroy them just as quickly using scripting, but I really don't know where to start with any of it. I also need a system that supports slopes and curves in the tiles, and I need to be able to tell if a collision was from the top, bottom, or either side of the objects Also, I would prefer to not have to resort to using Unity's physics engine to calculate things, as keeping the feel from my personal engine is very important, given that the game is a platformer.

    I have no clue where to start with any of this. I do not wish for full code, I just really need a starting point that I can use to figure these things out, as I've been unable to find any good starting point or direction for a day now, as all I've really been able to find are solutions for full 2D (and without slopes and the like), and it's really beginning to stress me out. So I'm really hoping that someone here can finally point me in the right direction.