Collision between static sprite and tile layer
by Davide Archetti · in iTorque 2D · 04/24/2011 (1:19 pm) · 1 replies
Hi,
the scenario is this:
a static sprite is in the center of the screen and never moves. Behind it there is a tilemap with its tilelayer.
By tilting the iPad, using the autopan feature, the tilelayer moves. Is it possible to know when a tile collides with the static sprite?
I've checked send and receive collision for the static shape and the tilelayer (in tilelayer send collision cannot be checked) and enabled the onCollision callback, and checked the collision box in the tile editing and created the collision shape over the tile, created a brush from this, and painted the layer with these brushes, and I can see the collision shape drew over the tile in the scene, but I don't receive any notification.
Am I missing something?
Thank you
the scenario is this:
a static sprite is in the center of the screen and never moves. Behind it there is a tilemap with its tilelayer.
By tilting the iPad, using the autopan feature, the tilelayer moves. Is it possible to know when a tile collides with the static sprite?
I've checked send and receive collision for the static shape and the tilelayer (in tilelayer send collision cannot be checked) and enabled the onCollision callback, and checked the collision box in the tile editing and created the collision shape over the tile, created a brush from this, and painted the layer with these brushes, and I can see the collision shape drew over the tile in the scene, but I don't receive any notification.
Am I missing something?
Thank you
Torque Owner Davide Archetti
Default Studio Name
I forgot to check the "Uses Physics" box