Team Spartan Cookies & Milk Forums
render.toScreen() on an Emitter - Printable Version

+- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk)
+-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html)
+--- Forum: Starfall (https://teamscm.co.uk/forum-7.html)
+--- Thread: render.toScreen() on an Emitter (/thread-1345.html)



render.toScreen() on an Emitter - TheOneAndOnlyTee - 16-09-2015

Just wondering if i'm doing something wrong or if SF Emitters don't utilize render.toScreen()

tried it but it seemed to stick at 0,0
2nd try ended up returning nil


RE: render.toScreen() on an Emitter - SuperPlayer - 16-09-2015

I tried that myself multiple times. This only works on HUDs. It would be cool if it would work on emitters or screens though.


RE: render.toScreen() on an Emitter - TheOneAndOnlyTee - 16-09-2015

it does work on EGP emiiters since they're essentially fixed 3D2D cams on a plane relative to the emitter, the code could potentially be used to fix it


RE: render.toScreen() on an Emitter - SuperPlayer - 16-09-2015

I like this. Would be a great addition with lots of potential


RE: render.toScreen() on an Emitter - Person8880 - 16-09-2015

This kind of thing is doing a bit too much for the user I think.

All you need to do is line-plane intersection with the parameters you pass to start3D2D used to define your plane, and the player's view direction as the line. This can be accomplished in Starfall quite easily with what's already available.


RE: render.toScreen() on an Emitter - TheOneAndOnlyTee - 16-09-2015

Did not think of that, thanks


RE: render.toScreen() on an Emitter - Garbius - 17-09-2015

T-17: That touch code I gave you has an applied line-plane intersection calculation that can be repurposed for this.