I’m somewhat new to blueprints and C++ but I’m trying my hardest to make strides, but I’ve hit what I think is a math roadblock. C++ was giving me headaches while trying to learn it so I thought I’d build up some knowledge in Blueprint first.
This is what I have so far in blueprint. This is in the ThirdPersonCharacter in the starter content pack.
This code is meant to generate a single hexagonal pillar mesh below the player (eventually it will be the origin point of the map), which it does. The next thing I’m trying to do is use a forloop to generate 6 more pillars around the origin pillar in such a way that they tesselate almost perfectly - just a slight gap between them. From then on, I would use more forloops to generate tiles out to the edge of the map until the specified map radius is reached. I would not need to worry about invisible barriers or any such nonsense, as the outermost pillars would grow in height to form an impenetrable wall.
Is there perhaps an easier way to do this? Am I doing something wrong with my math? I’m finding that degtorad turns whatever angle I specify as the offset for the secondary pillars into 0, thereby stopping the rest of the math from functioning correctly. Even doing my own manual degtorad calculation failed in this. Please explain in depth, not just how to do something but why as well, since knowing why UE4 does something a certain way is just as helpful as knowing how to do it.