Fixed rotation on beam sprites?

Please post any questions about developing your plugin here. Please use the search function before posting!
Jake
Junior Member
Posts: 19
Joined: Sun Oct 04, 2015 7:54 pm

Fixed rotation on beam sprites?

Postby Jake » Thu Jun 23, 2016 5:44 pm

I'm trying to draw beams so that the texture always faces up rather than the default billboard rotation but I'm not sure where to start, or if it's possible. I'm hoping somebody here might know
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Re: Fixed rotation on beam sprites?

Postby iPlayer » Thu Jun 23, 2016 5:48 pm

You need a specific VMT/SPR-file with "$spriteorientation" shader.

https://developer.valvesoftware.com/wiki/Sprite#.22.24spriteorientation.22_parameters_for_.vmt

As you can see, "default billboard location" is

Code: Select all

"$spriteorientation"   "vp_parallel"   // Always faces the player (all angles are changing)


You need

Code: Select all

"$spriteorientation"   "parallel_upright"   // Faces the player, but keeps upright (one angle is unchanged)
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image
Jake
Junior Member
Posts: 19
Joined: Sun Oct 04, 2015 7:54 pm

Re: Fixed rotation on beam sprites?

Postby Jake » Mon Jun 27, 2016 11:23 pm

I'll give it a shot, thanks!

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 115 guests