Collision Problem

BMGBMG Member Posts: 3

Hello,

Just starting on educating myself with Game Salad.

I've hit a wall with an issue. I'm using windows version, randomly, my actor will sometimes just pass through an object when it's coded to collide with it.

Please see video here:

Any help on why I'm having this issue will be greatly appreciated.

Thanks

Mike Brookes

Comments

  • SmokeyAce73SmokeyAce73 EarthMember Posts: 370

    @BMG I suggest check the density of the bird actor and make sure it more than the wall

    Developer For BLUNTentertainment - Feel Free To Message Me! - Free Beginner Templates!

  • BMGBMG Member Posts: 3

    @SmokeyAce73‌ Thanks for that but can you explain what effects the density has and how it works please?

    Cheers

  • SmokeyAce73SmokeyAce73 EarthMember Posts: 370

    @‌BMG

    density: the heaviness of the actor. A higher value will make the object harder to move by less dense actors. A value of 0 will make an object immovable but still affect other actors in the scene. Density can be set to any real positive number. (i.e. Density >= 0)

    Check the cookbook

    Developer For BLUNTentertainment - Feel Free To Message Me! - Free Beginner Templates!

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2014

    @SmokeyAce73 said:
    @‌BMG

    A value of 0 will make an object immovable but still affect other actors in the scene.

    Not sure any of this is actually true (there's a bunch of stuff in the Cookbook that is questionable, out of date or just plain wrong).

    You can set the density of an objet to 0 and it doesn't effect its ability to move at all, objects with their density set to 0 move the same as objects with their density to set to any other value.

    Also, the idea that changing the density of an object effects collision detection is questionable too, I've never seen anyone supply an example of density effecting collision detection.

  • BMGBMG Member Posts: 3

    @Socks thanks for the info on that, do you have any suggestions on what the problem could be?

  • SmokeyAce73SmokeyAce73 EarthMember Posts: 370
    edited April 2014

    Thanks for the info @Socks

    Developer For BLUNTentertainment - Feel Free To Message Me! - Free Beginner Templates!

  • BMGBMG Member Posts: 3

    Still require help on this if anybody knows?

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2014

    @BMG said:
    Still require help on this if anybody knows?

    Do you mind if I bore you with a much over-made point ?

    If yes, read on :smile: . . . . if not skip over this needlessly overlong explanation of a common forum question issue !!

    You have coded a bird to fly, to move up and down, to react to user input, to collide with columns, columns which themselves are moving across the screen, as well as a scoring system, menu pages, sound effects and all that kind of stuff - these elements are built with behaviours, rules, attributes, animations, actions and so on, these behaviours, rules, attributes and actions have within them various values, mathematical operators (+ - > < = and so on), references to attributes and instructions to follow if the conditions are met . . . and so on and so forth.

    Even the most simple game will have a fair amount of this 'code' - and there are numerous ways of achieving the same thing, in fact if you were to take 20 people using GameSalad to make a helicopter fly from point to point whilst dropping some bombs, I doubt you'd find two who'd programmed it in the same way.

    So, even simple games have quite a bit of code - and the way something is coded tends to differ from person to person - i.e. there is no 'correct' way of doing most things.

    So, you have a bunch of code on your screen right in front of you, all the rules, attributes, behaviours and so on - you can see how one attribute relates to another, how one rule detects something and passes it onto something else, you know why you put an action where you put it, why a behaviour does what it does and how an action effects some other part of gameplay which itself changes a rule somewhere which itself changes the value of an attribute, or user input or score keeping or . . . blah blah blah (let me know when I am boring you :smile: ) . . .and so on . . . all of it, right there on the screen right in front of you, you can scroll through and check any part of it as you please, check values, turn things on and off to see how they effect the project, move stuff around and so on - and even with this ability to sift through your code looking to track down the issue you are unable to track it down . . .

    . . . so imagine what's it's like for others who can see none of this code, they can't click on anything, turn anything on or off, move stuff, open expression windows to check values, change values or even simply look at the code ! Maybe you're using dozens of attributes or just 1, or maybe tables, or maybe the accelerometer or maybe none of these things . . . So as you can imagine it's next to impossible to offer any kind of help without knowing anything about your coding - your question is essentially like the majority of questions on the forum, which mostly boil down to 'my coding doesn't work as I expected it to work' . . . so essentially it's an issue with the way the code is set up, you can translate 80% of forum questions into "I have set up my code incorrectly, can anyone point out where in my code I have made a mistake?" - but puzzlingly people asking these questions often don't feel the need to show the code to anyone !? This happens so often on the forums that one forum member (who shall remain nameless!) has christened anyone attempting to handle these kinds of questions 'a member of the GPN' (the GameSalad Psychic Network). :smile:

    . . . or an analogy I have already bored others with:

    "I am doing a fairly difficult calculation, I should get 2240 as a result, but I keep getting 2160 ? I'm really stuck, I've got all the numbers and and operations like multiply and divide that I am using in the calculation right here in front of me on a monitor, but I'm not going to let you know what any of it is, I'm not going to tell you any of the values or what I am doing with them . . . . but if you can see your way to letting me know why I am getting 2160 instead of 2240 it would be greatly appreciated.

    If you got this far, firstly well done, and secondly I hope it makes sense !! :wink:

    tl;dr I've selected a card from a pack of 52 playing cards, I don't really know much about playing cards, can anyone tell me the name of the one I've selected ?

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870

    @Socks - I'm half tempted to put that in a post by itself and make it a sticky.

  • SocksSocks London, UK.Member Posts: 12,822

    @SlickZero said:
    Socks - I'm half tempted to put that in a post by itself and make it a sticky.

    Lol ! :) I'll only let you do that if you can guess the card.

Sign In or Register to comment.