Hello.
I would like features to stay where I put them, even if it's floating in mid-air.
In Spring 79, I would do: Spring.SetFeaturePosition(f,x,y,z) once in the Initialize, and they would stay there.
In Spring 80, they fall to the ground. I tried to do Spring.SetFeaturePosition(f,x,y,z) every frame, they still fall, just slower (I guess my code put them back in place, but the engine accelerate their fall and move them after I move them).
For now I destroy and recreate the features every frame, but when I'll have more features, I'm afraid it'll eat my FPS.
Oh, and I'd also like to put features underground, which I can't, even by destroying and recreating them every frame, since they're instabumped to surface.
I thought about using gl.FeatureShape (since I mostly want the visual of feature, doesn't matter much if they're mere hologram), then I remembered how broken it was.
Feature staying where I put them.
Moderator: Moderators
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Feature staying where I put them.
So you want movectrl for feature? Sounds reasonable.
Have you also considered translating them in upspring and just making them tall and appear to be in the air? Or is that not suited to your needs? You can set them to noblock, of course.
Have you also considered translating them in upspring and just making them tall and appear to be in the air? Or is that not suited to your needs? You can set them to noblock, of course.
Re: Feature staying where I put them.
is there a feature gravity tag? If not there should be one.
Re: Feature staying where I put them.
MoveCtrl for feature would be maybe overkill. I just want a way to tell the engine to not bother checking if those units touch the ground.CarRepairer wrote:So you want movectrl for feature? Sounds reasonable.
My feature are all at different heights, height which is calculated ingame. I do no wish to create as many feature type as there are feature in my map, nor to manually edit a hundred s3o everytime I tweak my map.CarRepairer wrote:Have you also considered translating them in upspring and just making them tall and appear to be in the air? Or is that not suited to your needs?
They were noblock from the start, actually, since I want them to be above a place where units can move.CarRepairer wrote:You can set them to noblock, of course.
For that map, I'm using features for the looks. So I don't need tangible feature. Just something that looks like features, but has zero physic, will do.
This is for that map btw:

I guess a dev thought it would be an improvment to have feature fall down and rise when terrain change, and can I see how in about any case but mine it it probably is, except no one thanks devs for new features when they work well, but should they break any of my experimental hackish ugly workaround, I'll be sure to whine all over the forum.
Today jK and KDR mentionned there may be a broken and soon-to-be-changed way to get the texture of a feature out of its ID, so even though it's way more work than I would have wish, I guess I'll have to use Lua's OpenGL to redraw features.
But some way to tell the engine to not apply physics to my features would be really appreciated.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Feature staying where I put them.
Not at all, it would solve your problem and be useful for all sorts of future features.zwzsg wrote:MoveCtrl for feature would be maybe overkill.