Important question, In need of HELP!

KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
edited February 2012 in Working with GS (Mac)
This is regarding collision. I am basically trying to find a better way to import an image so that the collision will work better on that object. Say for instance I have an image of a dolphin. I created the image in Photoshop. The images canvas is transparent, of course. I save the file as a png so it keeps the canvas transparent. When I import the image into GameSalad all you see is the dolphin image as expected but when I put the collision on the object, the collision box is set to the transparent canvas. So if I say, when the dolphin collides with a rock to destroy the dolphin, since the collision box is set to the transparent canvas, the collision occurs when the transparent canvas of the dolphin collides with the rock making it seem as though the dolphin didn't hit the rock but it's because of the canvas. I want the collision to occur when the visible actor collides with the stated actor. Is there a good way in GS to do this? Thanks in advance!

Thanks,
killerpenguins

Comments

  • POMPOM Member Posts: 2,599
    edited February 2012
    Best way is to make 2 actors, one actor that has all the movement rules and collision rules, this mask actor should be invisible, and in most cases smaller than your second animation actor.
    The second actor will be the visual of your hero, it will have all the animation rules etc , and it will be constrained to your mask actor ..

    Roy.
  • POMPOM Member Posts: 2,599
    Kinda like this :
    Photobucket

    The red square shows your mask actor collision box , and the green square shows the size of your animation actor ..

    Cheers
    Roy.
  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
    @P-O-M
    What do you mean by mask actor? I believe I know I just want to make sure.
    Also, I think I get it. So I have the image twice. The invisible one has the collision and movement rules and is smaller. The visible one doesn't contain the rules but it's X and Y are constrained to the invisible on. That is what I am getting and want to know if that is correct. Thanks again for your help!

    Thanks,
    killerpenguins
  • POMPOM Member Posts: 2,599
    edited February 2012
    You got it right , except this sentence "So I have the image twice"
    No need to have the image twice , you basically split your hero actor into 2 ,
    1) the size of the red square , this actor will have all the rules except the rules that deals with the animations, also this actor will be invisible so you don't see it .

    2) the size of the green square , this actor will be visible and will contain all your animation rules, it will be constrained
    to the X and Y (maybe also rotation) values of the red actor.

    If you still didn't understand , let me know mate.

    Roy.
  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
    @P-O-M
    I do apologize but still a little confused by what you mean by splitting the actor into 2. I understand everything else, just confused and trying to wrap my head around that. Also, would I want to do this for all the actors in which are going to have collision and is using the circle collision more accurate than the rectangle collision or depends on the actor? Thanks again for your help and understanding. It is greatly appreciated!

    Thanks,
    killerpenguins
  • POMPOM Member Posts: 2,599
    edited February 2012
    " splitting the actor into 2"
    Meaning make a use of 2 actors , not only 1..
    Actor 1 - the size of the red square , this actor will have all the rules except the rules that deals with the animations, also this actor will be invisible so you don't see it .

    Actor 2 - the size of the green square , this actor will be visible and will contain all your animation rules, it will be constrained
    to the X and Y (maybe also rotation) values of the red actor.

    You dont need to dod this for every character (although you can if you want) , only for your hero (the dolphin) ..
    Im making a demo example for you , will upload in a minute .

    Here it is:
    http://www.mediafire.com/?nc72to643b8v487
    Download and see what i mean , also it has explanations in "notes" inside the actors.
    Roy.
  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
    @P-O-M
    Okay, It totally makes since now. Thanks for all your help! It is greatly appreciated!

    Thanks,
    killerpenguins
Sign In or Register to comment.