# Can I use physics in Isometric map based games?

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?

• Please do not edit my post! I don’t like it, you guys just come and find a mistyped word and do the edit! why? if you can understand the question others will do too. I am pretty sure! Commented Aug 28, 2015 at 23:55
• You cannot use SpriteKit because it is a 2D engine, and your world is 3D in the isometric case. Commented Aug 29, 2015 at 12:09
• Editing questions and answers is a part of the site intent to provide good quality. Try not to take it personally because you are just fighting the wind. The site encourages people to make edits where appropriate whether it is fixing grammar, formatting or making things more clear. Commented Aug 29, 2015 at 19:44
• Yeah You are right, I am getting use to it, thanks for the advice Commented Aug 29, 2015 at 21:26