This is a bit of a longshot as it might not be much to go on, but I was wondering if someone can help me figure out how to do this. Whilst working on a Doom clone with a course I’m following, I’ve noticed that my enemy sprites snap and align themselves perfectly to the ground when I drop the Blueprint into a scene.
However, none of my other sprites, items, ammo, props etc do. I can’t seem to figure out how and why it does it with the enemy sprites but not anything else. I’ve checked through my base enemy Blueprint, but can’t seem to find anything it could be. And I’ve left notes. Likewise with the Components I’ve added. Does anyone have any ideas what could be the cause? I want all of my other items to do it if possible.
It might have to do with the anchors(center point of the blueprint) or collision on your actors! One thing you can do to test this would be to drag in a sprite above the ground and press the “End” key on your keyboard- it will snap to the ground based on collision!
Thanks for the suggestion. I tried pressing End whilst dragging a sprite Blueprint onto the ground, but it didn’t appear to do anything. It didn’t snap to the ground or anything.
I’m not sure about the Blueprint’s anchor point though. It could be that, but where would you go to check? I can’t seem to find it.
Could it be that Actors, or Actor Blueprints rather, are affected differently? I’ve noticed that if I change the scale of an enemy’s collision, so it encapsulates all of them, it helps with its placement in the world. But if I make the collision smaller, when I drag the enemy in, it clips through the floor. I also noticed that every Component in the Blueprint is a child of the Collision. But sadly, making the box collision for my items the parent and adjusting its size, doesn’t make any difference with its placement in the world.
Okay, it looks like it’s Alt + End. However, that snaps an object to the ground based on its pivot point, which puts my enemy Blueprint halfway into the ground. Just dragging and dropping it instantly snaps it above the surface.
I’d just love to know why, how, and if it’s possible to do that with other Blueprints.
Okay, I think I’ve worked out the reasoning for it, but it doesn’t look like something I’ll be able to replicate easily, if at all. It looks like it’s because my enemies use a Character Blueprint and have certain Components added by default, such as the Capsule Collision, Character Movement etc. Just dragging and dropping it into the scene, I can see it automatically repositions it.