empty model?
Moderators: winston, another_commander
-
- Above Average
- Posts: 19
- Joined: Tue Mar 15, 2011 11:49 am
- Location: Edenkoben / Germany
- Contact:
empty model?
I just had an idea how to solve an old problem in some of the suggestions in this forum, but it would require an entity with a "null model", this would be a .dat file without any triangles (perhaps a single vertex, if necessary). Of course,this entity would be invisible ingame, and would probably not trigger any collision detection or laser hits. I just wanted to know if the engine would support such an entity at all, or if I can just stop thinking further in this direction.
Re: empty model?
Funnily enough I was just experimenting with a model that had vertices but no texture. You couldn't see it was there, and it was possible to fly through it. The only way you could tell it was present was because it showed up on the scanner, and you could get a target lock on it, although laser fire appeared not to impinge on it. This was a single flat planar surface, for what it's worth.
Re: empty model?
And both of those are easy to deal with (the mass lock and the scanner lollipop).
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
-
- Above Average
- Posts: 19
- Joined: Tue Mar 15, 2011 11:49 am
- Location: Edenkoben / Germany
- Contact:
Re: empty model?
OK, here is the idea I mentioned, including a "geometry-less" ship:
https://bb.oolite.space/viewtopic.php?f= ... 97#p150697
Thanks again
https://bb.oolite.space/viewtopic.php?f= ... 97#p150697
Thanks again
- Capt. Murphy
- Commodore
- Posts: 1127
- Joined: Fri Feb 25, 2011 8:46 am
- Location: UK South Coast.
Re: empty model?
I've got something similar as the beacon for my Escape Pod Locator oxp.
The entity is actually a cube and it is textured (if only to stop a spurious log error about missing textures). But it is so tiny that I don't think you can get close enough to it that you are within 'drawing range' so it's effectively invisible. It's scan_class NO_DRAW so doesn't appear on the scanner or masslock.
It can be collided with though - although if the collision is with the player it's not noticeable as the entities mass is so low no damage results and the entity just bounces of at high velocity. This could cause problems for your idea though (I've posted in the linked thread about some other issues).
Also beware that an untextured object that is large enough to be seen may not be invisible as the core game engine will apply a default texture (with an error message in the log). I did some experiments with an untextured version of the 'alloy' model when developing this OXP and it's just kind of a translucent purple in game.
The entity is actually a cube and it is textured (if only to stop a spurious log error about missing textures). But it is so tiny that I don't think you can get close enough to it that you are within 'drawing range' so it's effectively invisible. It's scan_class NO_DRAW so doesn't appear on the scanner or masslock.
It can be collided with though - although if the collision is with the player it's not noticeable as the entities mass is so low no damage results and the entity just bounces of at high velocity. This could cause problems for your idea though (I've posted in the linked thread about some other issues).
Also beware that an untextured object that is large enough to be seen may not be invisible as the core game engine will apply a default texture (with an error message in the log). I did some experiments with an untextured version of the 'alloy' model when developing this OXP and it's just kind of a translucent purple in game.
Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1