Page 1 of 1
Spring 96: Features disappear if colvol isn't "Big enough"
Posted: 28 Jul 2015, 08:24
by Forboding Angel
So for example, lets say that you want a feature that exists visually, but you want it to not block pathing or projectiles. So the first part is easy, blocking = false,. The second part can only be done by making the collision volume not-hittable. So in upspring set radius to 1. Nope, feature disappears. Ok, in featuredef, set colvol box and 0,0,0. Feature gone.
What the hell do I have to do, put the box underground?
Is this an issue in spring 100?
Re: Spring 96: Features disappear if colvol isn't "Big enough"
Posted: 28 Jul 2015, 08:53
by hokomoko
Forboding Angel wrote:What the hell do I have to do, put the box underground?
That's actually what I did for bushes in S44.
https://github.com/spring1944/spring194 ... t.lua#L102
There's a limitation currently where things are drawn based on their radius, while radius is also used for other things.
Re: Spring 96: Features disappear if colvol isn't "Big enough"
Posted: 28 Jul 2015, 09:20
by gajop
hokomoko wrote:There's a limitation currently where things are drawn based on their radius, while radius is also used for other things.
This is a hugely annoying engine limitation that I found particularly difficult to work with during the previous LD.
We need to separate collision volumes for 1) drawing, 2) physics and 3) mouse selection at least (by default they could be the same, but it should be possible to specify different ones for each thing). Maybe even different colvols for unit physics, projectile and ray collisions but that's optional imo.
Re: Spring 96: Features disappear if colvol isn't "Big enough"
Posted: 28 Jul 2015, 09:50
by gajop
Also I think it would be very cool if we could abstract colvols and allow them to be standalone and add lua callins for handling draw/click/mouse over/collision(phys/proj) and similar events. Maybe even allow complex/multiple colvols such as multiple cubes although I think that's already possible. 2D colvols (colvols triggered by units entering an area, regardless of height) could be cool as well.
Ah that would be a wish come true for Scened.
Re: Spring 96: Features disappear if colvol isn't "Big enough"
Posted: 28 Jul 2015, 10:08
by Forboding Angel
Wow, I honestly thought I was going to get a lot of hate for this. I wasn't aware of this issue previously, due to the fact that evo nullifies this stuff automatically. I'm working on my maps, and I want certain features not to block shots in games like BAR/BA/*A/etc for the sake of gameplay. Most notable atm is my plants I'm using on akilon wastes.
Anyway, thanks for the heads up, it was driving me crazy -_-
Re: Spring 96: Features disappear if colvol isn't "Big enough"
Posted: 28 Jul 2015, 15:39
by FLOZi
Spring.SetFeatureBlocking can change projectile blocking, try that (with normal radius).
https://springrts.com/wiki/Lua_SyncedCt ... e_Handling
e.g. Spring.SetFeatureBlocking(featureID, false, false, false)
Re: Spring 96: Features disappear if colvol isn't "Big enough"
Posted: 28 Jul 2015, 16:01
by Anarchid
Maybe even allow complex/multiple colvols such as multiple cubes although I think that's already possible
It's called per-piece collision volumes (ppcv). At some point in time i made a flying fortress with a hollow interior which could be shot through.
MCL also uses something similar.
Problems that i've found: you can't have multiple aim targets on a unit, so the torus fortress had that peculiar effect of being invulnerable from below.