Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Angus Game Studio

4
Posts
6
Followers
2
Following
A member registered Dec 01, 2022 · View creator page →

Creator of

Recent community posts

Thank you so much for your response, Patrick! I truly appreciate your effort to help me, and I'm learning a lot through this process. Unfortunately, the issue still persists.

Unity 2D physics is based on  Box2D, which uses the same Semi-Implicit Euler integration you talked. I adjusted my algorithm to match this, but it didn't resolve the problem.

The main challenge lies in my virtual gravity algorithm. It calculates totalForceApplied as a vector and then applies it using Unity's AddForce method. However, AddForce only updates the Rigidbody's velocity in the next physics frame, which makes it unsuitable for immediate trajectory predictions.

Because of this limitation, I'm trying to simulate the physics myself. Despite my efforts, it hasn't been working, and I've been stuck on this for over a week.

I think it's best to take a break from this problem and focus on other tasks for now. Sometimes a fresh perspective helps! Thank you so much for your support—I truly appreciate it!

Piece of code showing how I manage the virtual gravity

My prediction code iterates over some X steps with a deltaTime to calculate where it should be. Could you share your prediction? It seems to work way better

How does it predict well where everything will be with the orbit logic? My prediction keeps getting small errors. 

The lower line is the prediction and the upper one is the real trajectory

Could you share some insights into the algorithm behind this incredible bullet prediction system with orbital influence? It's such an impressive feature—congratulations on creating such an amazing game!