I have a problem with my RTS Project.
As you can see for some reason, on some mouse positions the game sets the Location of my Actor to 0 0 0 instead of the Mouse Position, and I have no clue why.
This is the rather messy Blueprint. Though the only relevant part is only From my Event to the first SetActorLocation Node of course.
I remember when I first tried this out, I also had this problem, but for some strange reason I once was able to make it work fine, though later when I was puttung stuff in functions and stuff, it behaved like this again.
So I’m kinda clueless right now.
If its jumping to 0,0,0 its likely that your not getting a location out of it. Right click on your spawn transform and “watch this value” or just print string it and see whats happening. You can also check what the hit actor is and make sure its hitting something
Looks like you have a way way too short delay on your loop for setting the location which is probably the cause actually. If you are going that low then you are better off using onTick because thats like 62.5FPS there and could be causing problems
I ran into some similar issues with my own Strategy Game placing buildings, although i do it slightly different to yours, my problem seemed to stem from the Landscape itself.
For some odd reason when i Imported the Landscape as an heightmap it had collision issues in particular areas. To fix this all i did was just use the sculpt tool to slightly change the height of the problem areas and it must recalculate the collision and that fixed my problem.
So my suggestion would be to try the same, if you can identify specific areas of your landscape that cause this issue, try sculpting those areas slightly and see if it helps.
If you would like to talk further about it or chat about RTS development, add me on Skype.
Thanks you two.
Yes DevilsD, it actually was a problem with the Landscape! Using a normal plane exported from 3ds max, everything works absolutely fine! Gonna experiment further with the Landscape collision. Thank you very much!
As ZoltanJr suggested I print stringed the area where the Actor jumps to 0 0 0, and in those places I simply get no hit result.