Hi,
I have kept a game object( Cube) in the game world and trying to calculate the positions with the help of the collisions…
Inside On collision function i took one variable “Position” and incrementing the value each time programs enters the function…
Problem is that although all the cars are getting collided only some for some cars the position value is incremented… Why???
I am unable to figure it out… Please help me…
Thanks in advance
By ‘position’ do you mean placing? That is, which car is in first, which is in second, etc.?
Position is a variable that is initialized to get the rankings of the car depending on number of hits with the collider object
Ok, it sounds like it is the placing that you’re talking about.
In that case, I don’t think there’s enough information in your post for us to guess as to the cause of the problem. What I would recommend though is to use the debugger or add some debug output to try to narrow things down and get a better idea of where things are going wrong. (You could also post the relevant code to this thread for us to take a look at.)