Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: cel on July 23, 2017, 04:19:09 PM
-
hi guys,
I have a projector line that I want it to behave like a laser sight that follows the contours of the terrain, the laser x is supposed to be adjusted (I.e the texture scaled on the x), I've read that the shader for the projector has to allow this and that there is one (flashlight) in the standard assets. I have tried with the set property but can't get it to work.
Basically I want to scale up and down the projector on the x axis.
Any help appreciated
Thanks in advance
-
Hi,
I can't find the flaslight (unity 5.6 and 2017)
but maybe you can use a Line Renderer?
And with a raycast you can get the distance.
This video can help :
on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) you can find the 'Draw Line' actions and you can find many other 'Line Renderer' actions there.
-
I am using this asset here (sorry paid) that comes with a modified projector.
https://www.assetstore.unity3d.com/en/#!/content/57567
I am not using it as gun target, but it could probably be changed to that without too much of a problem.
(Are you talking about the lazer hit point, or the lazer line on the screen??)
-
@djaydino - I have the laser setup, what I wanted was for the laser to follow the contour of the terrain/ramps, as is if it hits a hill/ramp it just stops at the hit point, so basically have a line that follows the y coordinate of the terrain... projectors seem to be the answer but I changing the xscale of the projectors texture doesn't seem work.
@ tcmeric - looks cool, but can't find any forum posts regarding the asset or a way to get in touch with the developer
thanks
-
Their website is here: https://gamenative.com/
Email address: support@gamenative.com
-
I have a couple of custom actions for the ground target system that I wrote, such as set color, rotation, material and enable/disable rotation. If you decide to go that route, feel free to ping me here and I can send them over to you. 8)
-
that's great tcmeric,
I just sent an email to the developer asking if my request is possible... I'll get back to you if needed... thank you so much for your help
Regards
-
@tcmeric
Seems that the support email no longer works, just received a mailerdaemon saying that the e-mail address can't be reached
-
Hi,
Sorry i miss understood.
What exactly does not work?
i had no experience yet with the projector so i played around with this a bit.
in the end i found this tutorial :
http://hyunkell.com/blog/rts-style-unit-selection-in-unity-5/
and looked to the "Highlighting selected units using projectors" part
and below that i downloaded the Projector shader and the Projector alpha mask
Be sure to set Orthographic else you will start to scratch you head (like i did)
also the alpha mask image needs to be set to cookie and alpha source to 'from gray scale'
Maybe this can help you figure out what you want to do :)