(SOLVED) Physics object don't appear outside camera boundaries in the editor

So I have a weird issue

I want a Physics object to be created on the point x and y of another object >> now here is the weird thing I just noticed and I’m completely lost on this one

You put the object that has no physics >> BUT put it INSIDE the camera boundaries in the editor >> the physics object gets created on your object just fine

OK Now put the object that has no physics >> BUT now put it OUTSIDE the camera boundaries in the editor >> The physics object doesn’t get created around the ordinary object for some reason.

Ok so I told my self why not put the non physics object at the edge of the camera and test it out.
Now here is the weird thing.

You walk inside the camera boundaries >> The physics object is there
You walk outside the camera boundaries >> The physics object is not there anymore (Like it get hidden immediately)

Here is what I tried:
Changing the layers and masks >> Nothing
I even test it away from any other event >> Nothing
Changed the sleep option in the physics >> Nothing
Changed in the advanced settings in the sprite object that has the physics and I uncheck the culling option >> nothing

btw both objects are on the same layer in Base layer

My only question >>> What is going on here?

Very lost on this one, would appreciate any help on this.

Hi Khaled!

You have the art to find bugs!

Considering your talent, i would think it is more a bug than a question to progress in your game.

A+
Xierra

1 Like

I can not reproduce this, if I check the number of instances the physics object always present in the scene both inside and outside the camera.

Are you moving the physics object at all or only the camera? Is the physics object collides, interact with anything that could potentially make it moved, destroyed…etc? When 2 physics bodies forced against each other using a large force or high speed, the result could be that 1 goes over the physics boundaries like a wall or floor for example and fall or moved behind other objects.

If you could reproduce the problem in a small project and share it, it could help people to quickly debug this and confirm and find the cause.

1 Like

Hey @Amigo54 @ddabrahim

I honestly have no idea why :laughing:
it’s both helpful and a curse at the same time.
But I guess of how many games I played I got this ability.

It was a weird but honestly I couldn’t even tell if it was the project or something else.

OK
I actually Just fixed it after a sleepless night and hours and hours of searching around the code, not sure why it was the case but I was using a normal rotate event on that physics object and for some reason disabling it ended the issue and now the physics object appears whenever I go in the scene, is using the normal rotate event on a physics object results in a problem?

If you can tell me why this was the cause it would be helpful to understand it (There is no other rotate or other events related to that physics object)

Very random thing but It’s fixed thank god

Thank you for helping out my friends.

1 Like

I cannot tell you WHY but i can tell you mixing moving in any way forces you use for object almost never end up well

I don’t mean actual forces but i mean either is mixing platformer with physics
Or top down with platfromer
Or forces with physics

SO
Physics
Top down
Pathfinding
Platformer
Forces
Boids
GNERALLY you don’t want to mix them
You are lucky if you won’t get any bugs

1 Like