Hi there,
I’m trying to calculate the center point of each room floor in a house at runtime and then spawning an object at all those points.
Does somebody have a solution for me? I’ve stuck with this for a week.
Thanks
You can just put target actors in the rooms, much easier:
If that’s no good, maybe tell a bit more about your setup.
A rectangular room will be trivial. An L-shaped one a bit more complex. Unorthodox shapes may not be worth doing, in which case I’d just eyeball it and place a marker. Unless I had a 1000 rooms to deal with, that is.
As above, what’s the scope / setup?
That’s right, I want to make a function or an event that takes each room and gets the center point of it then stores those points in an array.
I have over 1000 rooms
That’s why I need to make it
That’s right,
unfortunately this is not working for me because I have over a 1000 rooms so I want to make a function or an event that takes each room and gets the center point of it then stores those points in an array.
That’s why I need to make
BTW each room is an actor itself so all i need is a way to get the center of an actor I tried GetActorBounds but it’s not the result i want so I asked mybe somebody knows a way to get it perfectly.
GetActorLocation gives you the pivot point. I assume that’s in the center of the room?
GetActorLocation doesn’t give the center and the pivot point is not necessary to be the center as well but GetActorBounds gets the Origin of the actor as well as getActorLocation sometimes depends on where the origin of the actor is sometimes it’s in the middle or at the sides But GetActorBounds Give the Origin so in my case I wanted to get the center of the static mesh not the origin but since the origin is in the center of the mesh I used GetActorBounds with a bit of modification.
Yes, sounds fine. But of course, I’m just guessing, because I have no information…
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.