How come my actor isn't making collision contact with other the actor?

Dell7730Dell7730 Member, PRO Posts: 388
edited March 2015 in Working with GS (PC)

So, I'm making this shooting game where Actor 1 starts from 0 size and grows to 250 pixels simulating the illusion that it's coming closer to me.
Now, my Actor 2 is the bullet, when it collides with Actor 1, it's supposed to destroy Actor 1. I can only destroy Actor 1 when bullet precisely hits the very center which is the X and Y of it, nothing happens when I hit the out layer of the Actor.

Best Answer

Answers

  • jamie_cjamie_c ImagineLabs.rocks Member, BASIC Posts: 5,671

    You must be using Interpolate Behaviors to grow your actor? The Collision Behavior does not work correctly during an Interpolate because Interpolate works 'outside' of the physics engine.

  • Dell7730Dell7730 Member, PRO Posts: 388

    @jamie_c said:
    You must be using Interpolate Behaviors to grow your actor? The Collision Behavior does not work correctly during an Interpolate because Interpolate works 'outside' of the physics engine.

    You're totally right, i'm using Interpolate behavior, if that doesn't work, any suggestion then?

  • Dell7730Dell7730 Member, PRO Posts: 388

    @jamie_c said:
    You must be using Interpolate Behaviors to grow your actor? The Collision Behavior does not work correctly during an Interpolate because Interpolate works 'outside' of the physics engine.

    I got it, just scaled the image to a factor of any number inside a timer

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,926

    Use a Timer. So if, for example, you were interpolating self.size.width from 50 to 100 over 2 seconds (25 pixels per second), you could do Timer Every 0.1 seconds change attribute self.size.width to self.size.width+2.5 (25 pixels per second).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Dell7730Dell7730 Member, PRO Posts: 388

    @tatiang said:
    Use a Timer. So if, for example, you were interpolating self.size.width from 50 to 100 over 2 seconds (25 pixels per second), you could do Timer Every 0.1 seconds change attribute self.size.width to self.size.width+2.5 (25 pixels per second).

    I'll try this also to see which one is smoother, the one I found working or this, thanks

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,926

    Well, I think you'll find that Interpolate is smoother at that speed, though I'm not positive. And I should have mentioned that Timer behaviors can run as quickly as every 0.03 seconds.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Dell7730Dell7730 Member, PRO Posts: 388

    @tatiang said:
    Well, I think you'll find that Interpolate is smoother at that speed, though I'm not positive. And I should have mentioned that Timer behaviors can run as quickly as every 0.03 seconds.

    I just found out that I can only target the area of the original size of the actor, meaning that if the Target actor spawned at 100 pixels, collision only happens within that original size, outside 100 pixels isn't colliding with the bullet actor

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,926
    edited March 2015

    @dellagarpo said:
    I just found out that I can only target the area of the original size of the actor, meaning that if the Target actor spawned at 100 pixels, collision only happens within that original size, outside 100 pixels isn't colliding with the bullet actor

    You'll have to post a link to download your project file because I can't re-create this issue. It works fine for me.

    Also, please create any new threads in Working with GS (PC). This subforum is for sharing tutorials that you've created. I'll move this thread for you.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Dell7730Dell7730 Member, PRO Posts: 388

    @tatiang said:
    Also, please create any new threads in Working with GS (PC). This subforum is for sharing tutorials that you've created. I'll move this thread for you.

    Thanks and here's the zip file, hope you can figure out what's wrong with it.

    https://drive.google.com/file/d/0Bw6pFarwlI0eanhWTC1MeTZTSnM/view?usp=sharing

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,926

    This is how it works for me:

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Dell7730Dell7730 Member, PRO Posts: 388

    @tatiang said:
    This is how it works for me:

    did you change anything? what did you do? that's exactly what I want.

  • Dell7730Dell7730 Member, PRO Posts: 388

    @tatiang said:
    I opened it on a Mac. Didn't change anything. :(

    I wonder if it works fine when played on my phone, let me try to see if it's just the preview that won't work on

  • Dell7730Dell7730 Member, PRO Posts: 388

    @tatiang said:
    I opened it on a Mac. Didn't change anything. :(

    It works great on my Android phone, all these time I thought it wasn't working cause it shows on the preview that it wasn't working

Sign In or Register to comment.