How To Make a Collision System?

Hello :p

For my game I need a simple collision system where my character collides with various objects and can jump on them. This would usually be simple, but in my game my character does not fill up the entire actor field, so when my actor collides with something, its not actually my character that is colliding with the object but rather the square space around my character. This makes it look like my character is colliding with an object without even touching it yet . How do I correct this? Thanks!

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You can do this with mathematical formulas that keep track of where the boundary of your collision should be with regard to the actor's position or you can use an invisible "mask" actor that is constrained to your actor but a different size... and then put the collision rules only in the mask actor.

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

  • AppTacoAppTaco Member Posts: 125
    edited November 2013
    Hello,

    Sadly, Game Salad doesn't not have a custom-collision-shape feature yet. Because of this, in order to fix your problem you will have to either, #1 change your actor image so it is in the shape of a rectangle or circle so that it will fill the whole actor collision shape or #2 have two separate actors, one that is for your image and one invisible actor that is constrained to the image actor for collision.

    Let me know if you any questions.

    Edit: Didn't see @tatiang's comment before I commented, that is also another effective method that works.
Sign In or Register to comment.