Collision Boxes
Lino
Member Posts: 10
I am having trouble finding an easy method to assign a larger collision box to an actor..
The problem is that the actor is rectangular and relatively long..
Do I have to change the actor in photoshop and just make the blank area around the actual actor bigger or is there another easy solution without having to change much in the game itself?
The problem is that the actor is rectangular and relatively long..
Do I have to change the actor in photoshop and just make the blank area around the actual actor bigger or is there another easy solution without having to change much in the game itself?
Comments
I already found this video but i this doesn't work with rectangles.
Either that or have each meteorite spawn an extra (larger) invisible actor that reacts to touch and have it move at the same speed and direction as the meteorite.
And I suppose you could also have rules related to mouse position. Something like this:
When Mouse Button is down
.....When [all] game.mouse.position.X > self.position.X-50 AND game.mouse.position.X < self.position.X+50 AND game.mouse.position.Y > self.position.Y-50 AND game.mouse.position.Y < self.position.Y+50
..........Destroy actor
That should allow for 50 pixels of space around the actor's center.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I guess i'll change the Image quickly as this seems to be the easiest solution...