Collision

Started by FighterWarrior, November 08, 2015, 05:57:40 PM

Previous topic - Next topic

FighterWarrior

Hello, I am creating a character in MUGEN and everything is working, except when my character comes into collision with itself (testing mode), it pushes itself backwards. Any help?

Noctis

...Because you're walking into him? I'm not sure I understand. Are you saying you don't want your character to be pushed? Because that's a tough cookie to code. There's no fullproof way to stop your character from being pushed. You could try simple things like if you're not using any commands and not in any attack states or gethurt states, but yet your x velocities have a value, you could have a velset to read that and then have it use the same amount of velocity, but in the opposite direction.
For example...
trigger1 = stateno = 0
trigger1 = vel x > 0
value = vel x*-1

Or

trigger1 = stateno = 0
trigger1 = vel x < 0
value = vel x*1

This will reverse your current vel and technically hold you in place, but you'll look really jittery and shaky.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

FighterWarrior

Thanks, but...
Im not sure how to put it...
Most MUGEN characters gently push the other if they continually walk towards them.
My character gets knocked back whenever it tries to do that. It makes getting in other fighters very difficult.

Noctis

Still not sure I understand, but I'll try again. Your clsn box is bigger than your width. Increase your width under your [Data] or [Size] section.

[Size]
xScale = 1
yScale = 1
ground.back = 15
ground.front = 15
air.back = 15
air.front = 15

height = 60
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = 8, -83
mid.pos = 6, -55
shadowoffset = 0
draw.offset = 0,0

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

FighterWarrior

My problem still persists, but thank you for the support thus far. Later, I'll upload a .gif to show you, which should make more sense.

Noctis

Please do. Images or videos are always a plus when asking for help.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Odb718

Use CTRL+C so you can see the collision boxes in mugen. You need to have the width be smaller than the blue clsn box.
Otherwise, as soon as the blue boxes touch, mugen snaps the two players so that the bars are at the ends of each other. You'll get a popping effect. If the blue boxes are touching and THEN the width bars touch, mugen stops it right there. But the stopping doesnt happen until the blue boxes hit.
vVv Gouken718 vVv SabreTooth718 vVv


Noctis

I just told him to make the width bigger.
Fuck you, dyslexia.

I hope you correct me more often, Odb. I'll never catch my dyslexic mistakes.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

FighterWarrior

That solved the problem!
很谢谢!