Oh snap! You're watching Rich TVX News Network! The source of raw, breaking news.

Complex capture area test preview – Battlefield 2042 Portal Rules Editor

A quick preview of my current project in battlefield portal – a rainbow 6 style siege mode.
The difficult part with these modes is that without any spacial editor, making a complex capture area becomes difficult.
Hopefully a spacial editor will come soon but I think the workaround I have got here works good enough for now! Clearly if working with circle objectives the solution is easier (and I might do that for some other modes) but for this one, as the shape could potentially be a more complex polygon shape, there needed to be some additional logic in place.
If you watch through you will see it detects when the player steps into the defined area and adds them to the players in the capture area count. You should be able to see the area is a complex shape (with the little undertunnel cut out too!) and only the ground floor valid.
As I am working on this mode I still have one eye on other modes I might want to create and also looking at making code flexible so it is easier for others to use. This is another mode that I won’t be able to make a tutorial from unfortunately, and after this I really do need to settle back and look at a few simpler tutorials so that I can build up some of the basics again.
This has been fun though and a much more difficult problem to resolve than I thought it would be.
Figured out how to ray cast through the portal rules editor using the algorithm found here: https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html
With credit to W Randolph Franklin.
I have needed to make some modifications to it, clearly to make it work with the rules editor and its restrictions as well as this specific use case.
Anyway, this is just a quick preview of what I have been working on. Still a lot to add but happy that this bit is out of the way.
Code and full video coming soon (ish :))

Please subscribe if you haven’t already, for more tutorials and portal info!