While making my building mode system, i tried many ways to block the camera from going too far away from my grid actor.
What would be the best practice to clamp the maximum location the camera can move to using an rts style camera (camera pawn uses floating pawn movement component and is dynamically locked on it’s z axis)
instead of moving on the z axis
can you declare the position of the z axis and make it move on another axis, like on the XY plane and the Z is stated , which i think will give you the Z axis according to Differential Equations
i’m trying to make bounds on the X and Y axis, i was able to generate box collisions and block it for a while but after a certain value the camera clips out of bounds like this
2024-03-03 22-44-35.mkv (13.3 MB)
sorry i cant download videos you can host it ill watch it
Seems your collision box has some gaps or they are too thin so the camera pawn has a chance to go through.either larger you collisions, or you could manually find a location where you think is the maximum left,right,forward and backward.write each location’s XYZ on paper.and then before moving camera first check if it’s location XYZ number greater or less then what you have written down .if it reached the boundaries just set it’s location to equal that boundary.
i actually find a dumb solution, basically, once the camera touches a box, it inverts the player input and when it’s not it puts it back to normal
works for now but i haven’t tested it with the wall system, might change