Should i remove the physics - best practice

Hey guys,

i’m not sure if i should keep working with the Bullet2PhysicSystem…

i’m working on a top down game like diablo.
I started with the physic system to get position / entity which was clicked by the user like in the raycast example. additional i use the collider shapes to create a navigation mesh with sharp nav to find the best move-able path to the entity or position.

I don’t really use the physics to move objects… the characters walking along the calculated path and don’t collide with anything, so i moved my entities by transformation.position.

As my first bot was born :wink: i recognized that the collider shape is not moving with my entity so i had to update the physic transformation - UpdatePhysicsTransformation to fix the position. worked fine at the beginning but after playing around 5 minutes it seems the collider shape have somehow a offset to my entity.

i think this is not the best practice… i use a physic engine and moving my objects manually :wink: i can change all the stuff to a character controller and move them with the physics but what you guys think is the best way to continue? its also easier for me to program the movement etc. by myself because if the physic moves the object somewhere else i have to recalculate the navigation path on every loop again!?

If i gonna remove the physics… how do i get the entities and positions without the simulation raycast. is there a good / easy way to get the position on the ground and/or entity by mouse click without physic simulation?

i don’t know if such games really use physics… this is my first experience in game developing… i don’t know whats the best architecture and running from one problem to the next… so maybe the questions are quite stupid but i don’t know how these stuff is handled in other frameworks…

maybe someone is working on a similar project and can maybe share some knowledge and best practice with me.

thx guys and best regards,
Patrick

hey guys,

not sure if my question was unclear or stupid…
I’m still interested what you guys think about - top down game with or without physics.

best regards,
patrick

Hi,
I think that you should use the Physics engine anyway. Raycasting with a physics engine is highly optimized, So even if you just raycast it is very legitimate to use it.
About the offset issue you are having, might be related to the Collider going into sleep mode. Make sure you set Collider.CanSleep = false and see if that helps.

Im working on a top down game, but its my first time with a 3D engine, could you help me with that movement, i actually use the main character as the center of the camera, so always the rotation and movement depends on the mouse coordinates (really archaic way u.u). But i dont really know how to move character to the posistion clicked on the map.

I would really appreciate your help, i know maybe you dont want to share code, but i would like some steps, its been hard for me to start scripting with the few documentation we have.