Bug when "actor with tag" instead of "actor of type".
I figured out this weird bug with actor tags.
I have 2 objects (actor A) and (actor
. I want to touch actor A and in its place actor B will spawn.
If actor A is not moving then actor B spawns at the correct place.
If actor A is moving down a slope and i press it then actor B spawns in a random position around actor's A center X,Y.
This happens ONLY if both actors have a Collide rule of "actor with tag:PhyiscalObjects" (i grouped my physical objects, so i know which actors to collide with what)
IF i have set "actor of type:{ex. the ground or walls actor}" on both actor A and actor B, then actor B wont spawn in random places and it will spawn where it was suppose to....dead center of actor's A (X,Y)
...using latest GameSalad
I have 2 objects (actor A) and (actor
If actor A is not moving then actor B spawns at the correct place.
If actor A is moving down a slope and i press it then actor B spawns in a random position around actor's A center X,Y.
This happens ONLY if both actors have a Collide rule of "actor with tag:PhyiscalObjects" (i grouped my physical objects, so i know which actors to collide with what)
IF i have set "actor of type:{ex. the ground or walls actor}" on both actor A and actor B, then actor B wont spawn in random places and it will spawn where it was suppose to....dead center of actor's A (X,Y)
...using latest GameSalad
Comments
So for example if actor A collides with any Actor A, then this weird "jumping" will appear.
I think its this "Bounce when colliding" action that Collide Rule has. It shouldn't bounce...why bounce ? Just check if collision is detected....why add extra force to actors ? I dont understand it.
Collision detection...is just that...collision DETECTION...
http://gamesalad.com/game/34984
Search for : Collision Rule in gamesalad to download the project
If you download the template i put you'll see what i mean..its pretty straightforward. Its definitely a Gamesalad bug. The actors shouldnt be "acting" this way.
Thats just a scientific, physical, astrophysical explanation from your local Rumi!
The thing is that a) i am destroying the actor before spawning the new one, and b) this only happens if the Actor A has a collide rule for other Actor A objects...or Actor B for other B objects.
If i take the rule away, everything is fine.
This has to do something with collide rules in conjunction with spawning rules. Because if instead of destroy/spawn actors, i move them somewhere outside the screen, and swap them instead of destroying them, then this bug wont happen.
It is as if the Gamesalad collision rules run before the spawn rules, when it should be the other way around...First spawn...and then check for collisions...maybe its a programmers error.