Jump to content


Photo

Collision Issues


  • Please log in to reply
11 replies to this topic

#1 Minishcactus

Minishcactus

    GMC Member

  • New Member
  • 55 posts
  • Version:Mac

Posted 02 May 2012 - 11:52 PM

For some reason, my main character has just started sticking to every surface instead of moving smoothly. I've checked to make sure the bounding box for his running sprite is the same - and in a rectangle form. I've also made sure he's not solid, and I've made sure that precise collision checking isn't on - yet he still crashes. This is a big problem -- I don't know what happened.

Does anyone have any ideas?
  • 0

#2 creators124

creators124

    awesomeliciousmember

  • GMC Member
  • 866 posts
  • Version:GM8

Posted 02 May 2012 - 11:55 PM

posting more on how your character moves collides and stuff.(eg codes, ect)
  • 0

#3 Minishcactus

Minishcactus

    GMC Member

  • New Member
  • 55 posts
  • Version:Mac

Posted 03 May 2012 - 12:07 AM

posting more on how your character moves collides and stuff.(eg codes, ect)



Character will move when you press the key D or A - will move right on D and left on A.

Example:

Keyboard Event A Key:

If relative position (-4,0) is collision free for only solid objects
jump relative to position (-4,0)

Press A Key:

Change sprite into DamienRunleft

Release A Key:

Change Sprite Into DamienStandLeft
  • 0

#4 creators124

creators124

    awesomeliciousmember

  • GMC Member
  • 866 posts
  • Version:GM8

Posted 03 May 2012 - 12:11 AM


posting more on how your character moves collides and stuff.(eg codes, ect)



Character will move when you press the key D or A - will move right on D and left on A.

Example:

Keyboard Event A Key:

If relative position (-4,0) is collision free for only solid objects
jump relative to position (-4,0)

Press A Key:

Change sprite into DamienRunleft

Release A Key:

Change Sprite Into DamienStandLeft

I'm guessing you use DnD.
also I'm guessing you are using the same thing for the D-key but a little different.
try to make the checking to -5:
If relative position (-5,0) is collision free for only solid objects
jump relative to position (-4,0)
  • 0

#5 Minishcactus

Minishcactus

    GMC Member

  • New Member
  • 55 posts
  • Version:Mac

Posted 03 May 2012 - 12:21 AM



posting more on how your character moves collides and stuff.(eg codes, ect)



Character will move when you press the key D or A - will move right on D and left on A.

Example:

Keyboard Event A Key:

If relative position (-4,0) is collision free for only solid objects
jump relative to position (-4,0)

Press A Key:

Change sprite into DamienRunleft

Release A Key:

Change Sprite Into DamienStandLeft

I'm guessing you use DnD.
also I'm guessing you are using the same thing for the D-key but a little different.
try to make the checking to -5:
If relative position (-5,0) is collision free for only solid objects
jump relative to position (-4,0)



Just attempted that - he's still getting stuck to everything ;n; I think it's an issue with his running sprite having weird collisions or something?
  • 0

#6 creators124

creators124

    awesomeliciousmember

  • GMC Member
  • 866 posts
  • Version:GM8

Posted 03 May 2012 - 12:23 AM

umm...
is there something else that controls your character's movement?
  • 0

#7 Fihrilkamal

Fihrilkamal

    GMC Member

  • GMC Member
  • 348 posts

Posted 03 May 2012 - 12:28 AM

Make sure you have the same origin for all of your character's sprites (or you can also use a mask), if you get stuck after jumping then it might be your collision event's fault.
  • 0

#8 Minishcactus

Minishcactus

    GMC Member

  • New Member
  • 55 posts
  • Version:Mac

Posted 03 May 2012 - 12:52 AM

Make sure you have the same origin for all of your character's sprites (or you can also use a mask), if you get stuck after jumping then it might be your collision event's fault.



Because the sprites are different lengths/etc - the origins are different if only to make sure they transitions between using the sword and running and standing is smooth - do you think that could be the issue? I wanted the animation to be smooth - but that's such a pain if that causes my running to get messed up :(
  • 0

#9 Fihrilkamal

Fihrilkamal

    GMC Member

  • GMC Member
  • 348 posts

Posted 03 May 2012 - 01:07 AM

then try use a mask, it's very helpful for these kind of situation. Because no matter how your sprite size is, the collision will always be the same.
  • 0

#10 Minishcactus

Minishcactus

    GMC Member

  • New Member
  • 55 posts
  • Version:Mac

Posted 03 May 2012 - 01:09 AM

then try use a mask, it's very helpful for these kind of situation. Because no matter how your sprite size is, the collision will always be the same.


I've never used that before - could you direct me to a place where I could read about masks?
  • 0

#11 Fihrilkamal

Fihrilkamal

    GMC Member

  • GMC Member
  • 348 posts

Posted 03 May 2012 - 01:19 AM

See Game Maker Help, then in the indeks type masks.

You'll find mask below the 'parent' whenever you edit your object, try to experiment with it.
  • 0

#12 Minishcactus

Minishcactus

    GMC Member

  • New Member
  • 55 posts
  • Version:Mac

Posted 03 May 2012 - 01:49 AM

Awesome! It's working now! :)
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users