Best way to add a block for RTS camera?
So I have made a camera for my rts game it works really well. Watched videos even took a look at the RTS community project. My camera works fine but one thing I can not seem to do is make a block system. You know you can only go so far on the map. I tried using a blocking volume but it just fly's up on to of it. Does any one have a Idea or maybe a solution on how I can do this. "My camera has collision enabled and it wont go off terrain but meshes it flys on top. I have a idea like make a box with collision block volums but would that work? I got a big map so I don't want to waste 30 minutes setting up a blocker if it may not work. If any one could provide any detail on this that would be amazing thank's.
asked Feb 14 '15 at 06:59 AM in Blueprint Scripting
Depends. Did you make a camera which is attached to a dummy-pawn via a spring-arm, or did you use a PlayerCameraManager?
Either way, the usual implementation is to make the dummy-pawn colliding only with a specific collision channel, so it passes through your units/walls/landscape/whatever, but colliding with invisible walls that you set to the same collision channel. This way you cannot get out of your bounds.
(see this for documentation on custom collision channels)
answered Feb 14 '15 at 03:03 PM
I had this kind of issue while making my RTS camera. Here is how I made it work: I have CameraPawn, which uses SphereCollision as a ROOT component, it is kinda very important, before Sphere my ROOT component was an Empty StaticMesh and you guess right it will not collide with anything no matter what you set in Collision Settings. After that add a Blocking Volume to the level, you can set size of the Blocking Volume to be really big (I don't think it will impact performance or anything) and you can also make it Hollow (so you will need one Blocking Volume for a rectangle shaped map. Now set the Collision presets for both Blocking Volume and your ROOT CameraPawn component to Block each other and don't forget to check Sweep on your SetLocation nodes (your camera movement graphs).
answered Feb 03 '17 at 01:03 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here