Game Development Community

Overlaying Tile Col with static Sprite Col

by Eric Kinkead · in Torque Game Builder · 07/19/2007 (10:09 am) · 4 replies

www.gametitan.com/TGB/CollisionProblem.jpg
The collision of my trees work great when they are not overlapping. but as this image shows, when the trees are overlaying the tile collision, their collision becomes Nul and the character can walk over them even though no settings where changed (same copy of the trees that you can collide with if they are not overlaying tile collision)

So the simple solution is: dont overlay the tile collision.

I was wondering if I could force TGB to recognize the collision even if it is over the Tile's collision boxes.

thoughts? ideas? "just get back to work eric" comments ? :|

#1
07/19/2007 (10:44 am)
Hmm yeah it does sound like it's stuck on triggering the tile layer's collision. Does the character always have to collide with the tile layer? If not, you could set him to not collide with whatever layer the tile layer is on.
#2
07/19/2007 (11:00 am)
Ah ha !!! I found my error and it is embarassing!! Trees are Layer 15. I had the characters collision with 15 turned off. For some reason it works with it turned off, unless the sprite is overlaying a collision tile that is turned on.

So I guess what I need to make sure is, if I create a collision, dont assume it works because the character can bump into it, make sure the character has that layer turned on. (i guess i thought since he bumped into it when it was not overlaying col data that it was automatically on)
#3
07/19/2007 (11:16 am)
Haha so it had a collision response even though it wasn't supposed to collide with that layer? That's a bit weird! Are you using 1.5 or an earlier version? I'm glad you found the error. Looks like an interesting project, too.
#4
07/19/2007 (11:28 am)
1.1.3 Thanks!
Quote:you could set him to not collide with whatever layer
This got me thinking '...hmm what are his layers he is supposed to collide with btw...' haha

yes, I can set anything up to have col and my character will bang into it if it has the Send/Recieve col checked. but yea, to have it act properly i now obviously need to make sure that its in the layer.

another strange thing is those Collision Layers and Group Layers. I can check and uncheck things. save it even under a diff level name, run it, then go back to it and they are returned to the original state before checking them. thats kind of a big mystery to me right now as to why it doesnt sometimes save those edits.

Quote:Looks like an interesting project, too.
Thanks !!! its a pretty cool game for little girls and boys. (we need more scripters!! lol)

EDIT: oh, perhaps since ot always forces all groups to be on, and all objects have a default group of 0 then that is why things can always collide. But again it only seems to work properly if I make sure the Layer Col is on. Thanks again!! :D