Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Sensor is not detecting collision with sprites set to physics mode = Static or Kinematic

Author
Message
Abiz
11
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Amsterdam
Posted: 19th Jun 2017 21:56
I have a sensor in a screen (sensor is dynamic) and the sensor is part of a dynamic sprite that is moving.
I want it to detect and "breakable" items.

This works fine as long as the breakable item has physicsmode Dynamic, but doesn't work at all when it has physicsmode static or kinematic.

The problem is that I NEED some of these breakable items to be FIXEED in my world. (so I shouldn't be able to push them out of the way)
To do that I need them to be either STATIC or KINEMATIC.

Help, why is this not working????
The sensor is is sensor, because it is larger than my object. So my physics controlled object would collide with the breakable and stop. However the sensor (which is attached to the physics sprite) does need to see it....

Any alternative solution would be appreciated as well, as long as it uses the collision engine, because that is what drives our game.
Thanks for any and all help,
James

CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 19th Jun 2017 22:21
First, I'd recommend you use SetPhysicsDebugOn to make sure all your physics shapes are in the right place if you haven't done so already. Then, post some code for us to see what you are doing so we can help
Abiz
11
Years of Service
User Offline
Joined: 14th Nov 2012
Location: Amsterdam
Posted: 25th Jun 2017 03:22
Got it, a sensor must be dynamic for it to "see" things in the physics world.
It all becomes more complicated with Category & Collide bits

Login to post a reply

Server time is: 2024-03-28 12:10:58
Your offset time is: 2024-03-28 12:10:58