Shrink collision size.
As_Of_Latte
Member, BASIC Posts: 343
Is there a simple formula I can use to shrink the collision size of an actor?
My actor is 130x130 but I would like his collision size to be 65x65, still centered inside the actor.
I've researched and found that you can mask/constrain an invisible actor over the current actor, but I'd like to know if there are any other solutions first.
Thanks!
Comments
You may be able to use the magnitude function to tell how far an actor is from another actor. You can then use those numbers to "shrink" the collision area.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
@Braydon_SFX I appreciate the quick response, thanks. That sounds like a good plan! However, for a right brained person like me, magnitude functions sound a little intimidating and I would have no idea where to start lol.
Do you mind going into a little more detail ?
Sorry - I replied but missed the part about the constrained actor.
My Blog / App Store / Google Play
Anyone?
Can you be a little more specific about the circumstances in which you need to reduce the collision detection size, is the actor moving, rotating, circular, rectangular . . . etc etc.
@Socks Thanks for the reply! Well, I have decided to go with the constrain an invisible actor over the current actor method...It seems to be working. If for some reason this method fails, I'll post with more details. I appreciate your consideration.
That's the method I would use too.
I have used that method in the past and it works a treat with no issues.
Free Mini Games and Demo Templates
I actually would like you to elaborate on that. I'm creating platform cubes for an endless runner at a simple size. The collision boundary is 32x32 but i need the graphic to be slightly taller to give an actor a feel of running on grass. The graphic would be more like 32x36 but i don't want the main player to look like he's running on the tip tops of the grass blades.
I'll look for this function you're talking about and start playing with it if i find it. But I would still like more elaboration like i said.
Make your platform 32x32, then place a second 32x36 actor over the top of the first actor, this second actor will contain the image of the grass.