Collision Issues
#1
Posted 02 May 2012 - 11:52 PM
Does anyone have any ideas?
#2
Posted 02 May 2012 - 11:55 PM
#3
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
#4
Posted 03 May 2012 - 12:11 AM
I'm guessing you use DnD.
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
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)
#5
Posted 03 May 2012 - 12:21 AM
I'm guessing you use DnD.
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
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?
#6
Posted 03 May 2012 - 12:23 AM
is there something else that controls your character's movement?
#7
Posted 03 May 2012 - 12:28 AM
#8
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
#9
Posted 03 May 2012 - 01:07 AM
#10
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?
#11
Posted 03 May 2012 - 01:19 AM
You'll find mask below the 'parent' whenever you edit your object, try to experiment with it.
#12
Posted 03 May 2012 - 01:49 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











