I don't think it would necessarily be advantageous to split each banner into a separate object for collision testing purposes. If each banner segment is an object, the game will test for collision with a bounding sphere for each segment, each frame. This means there would absolutely be unnecessary tests each frame that could be minimized by keeping the banners in larger sets. Obviously, there will be more tests for the exact collisions since you would be testing against multiple banner segments once you collide with one of the bounding spheres. I think the exact optimized number of segments would depend on a bunch of factors like: track path (will you collide with bounding spheres of banners on other parts of the track), number of banner segments, and number of spheres per segment.haggqvist wrote:On the tech side; as it is now the fencing is split up into 14 parts for the GP-tracks, i.e. one .jm placed at 0,0 for every banner texture.
Would the collision testing be faster if the fence objects where split up even further e.g. with a separate .jm for every single continuous segment that has the same texture?
My idea was to place 2-4 spheres along the top edge of each fence segment and set up the collision values so that it's fairly easy to go across it at slower speeds while still making you crash when you run into it at higher speeds and lower angles of intersection.
Assuming you only collide with max one bounding sphere at any given point, there are 100 banner segments, and each segment has 4 spheres:
100 segments as 100 objects: 104 sphere tests (100 bounding + 4)
100 segments as 25 objects: 41 tests (25 bounding, 16 object)
100 segments as 10 objects: 50 tests (10 bounding, 40 object)
So you could figure it out like that. Assuming anything I've said here was correct...