uniform relativePosition

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

uniform relativePosition

Post by Svengali »

I could need some clarification about the uniform binding relativePosition. It is in the whitelist and documented as bindable to entities and would be a very convenient way to check the distance to the player without invoking additional JS. When bound to an entity I get (v1.76.1 and r5153)

Code: Select all

16:30:47.562 [shader.uniform.bind.failed]: Shader could not bind uniform "showIt" to -[ShipEntity relativePosition] (target does not respond to selector).
16:30:47.562 [shader.uniform.set]: Set up uniform <OOShaderUniform 0x67bebf8>{0: (nil) showIt = INVALID;}
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: uniform relativePosition

Post by JensAyton »

relativePosition doesn’t exist in 1.76; it was probably “cleaned up” at some point. I’ve re-added it in r5161 with a note that it’s exposed.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: uniform relativePosition

Post by Svengali »

Muchas gracias, Ahruman.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: uniform relativePosition

Post by Svengali »

Could the relativePosition be made that it switches to position instead for missionscreens?
Post Reply