Can't get collision to work with animated character #443
|
Hi there, I am working off some tutorials and can't get objects to repect collisions. Here is the code. kaboom.js main.js scene.js The 'faune' characters passes through the stone. Expected result is character will not pass through object. Any help is appreciated. Thanks! |
Replies: 4 comments 2 replies
|
Ohh is strange, what version are you using? |
|
Can you check if the object has the correct collider in inspect mode? (Press |
|
Here is a screen shot of both objects. Tried it using loadSprite and loadSpriteAtlas using anims property. 

The mechanism to prevent solid objects moving into each other is inside
.move()frompos()component (it needs to know the velocity to prevent tunneling), if you're using directly assigning.pos =it won't stop them from moving into each other.If you want to directly assign
.posyou can also call.pushOutAll()every frame to push the object out of every other solid objects, but that won't prevent tunneling when it's moving in high speed.