I am trying to use physics in my game which is an isometric map based strategy game that the player deals with a city full of buildings, roads and people in it. I am writing the game with Swift and SpriteKit technology.
(the following picture shows a snapshot of my game)
MY GAME
I like to use Spritekit's physics library so I would be able to simulate car accidents and preventing them to go throw the buildings and other kind of stuff that physics could provide.
I am familiar with Physics and I have enough experience with Bullet and I can write a 3D game using OpenGL ES and physics, but I haven't really used physics in 2D isometric map games.
I have also wrote a 2d physic game that was really 2d (an endless runner) which was actually a sample of a book but as you can see in the following picture the gravity vector is the Y axis and every thing is pretty easy.
Here is the gravity vector that is used to create the game at the following picture.
self.physicsWorld.gravity = CGVectorMake(0, -9.8)
Someone Elses Game, Book Sample
Book Name : iOS 7 Game Development
Author : Dmitry Volevodz
You may find the book Here
However, in an isometric map game you can't just set and assign the Y axis as a gravity vector. since the method which sets the gravity vector accepts two arguments it is a big hope that I can use physics in my isometric map games. For example something like this
I Say!!! :
As I am still using a cartesian coordinate system (perpendicular axis) X and Y axis make a 90 degree angle and if I need to project the gravity quantity over the X and Y axis it would be gCos(45),gSin(45) I haven't tested it yet.
self.physicsWorld.gravity = CGVectorMake(-9.8*0.707, -9.8*0.707)
May you please help me on setting the gravity vector and how should I define the moving objects like cars and humans and the static ones like buildings any other tips on modelling physics in isometric map are also welcome and appreciated.
The main question is: is it really possible to use physics in an isometric map based games?