Hello,
I am working on a game, and the game has to detect wether the player is grounded or not.
Now I did this trough a boolean variable which is turns true whenever the player collides with an object, and turns false when the collision goes into “ended” state. It all works fine except when sometimes I hit 2 objects at the same time.
What I think happens:
- Player is on object1, grounded = true
- Player is still on object1, but hits object2 while connected to object2. grounded stays true
- while at all times still connected with object1, player disconnects with object2, grounded = false
But the player is still on object 1 so should be true
Is there anyway to check if the player is colliding with any object and to only turn the grounded false when the object is absolutely NOT colliding with anything else.
Cause now it turn false when colliding stops with one object but it does not check wether its still collided to another object before turning false. And I cant find a way to fix that
[import]uid: 118839 topic_id: 25793 reply_id: 325793[/import]
[import]uid: 52491 topic_id: 25793 reply_id: 104393[/import]