3D Model don't rotate

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

3D Model don't rotate

Postby GGianpy » Tue Oct 13, 2020 5:54 am

good afternoon,
i am trying to create a replica of the brutal doom tracers but the 3d model always looks straight ahead.
the tracer looks from the direction where I shoot, but if I shoot up or down the tracer does not rotate nor is it for the x and y axis.

here is the code:
Code: Select allExpand view
Class Tracer : FastProjectile
{
   default
   {
   Radius 1;
   Height 1;
   Speed 20;
   Scale 0.1;
   RenderStyle "Add";
   Alpha 0.85;
   DeathSound "weapons/rocklx";
   Projectile;

   +RANDOMIZE
   +FLATSPRITE
   +NOEXTREMEDEATH
   }

   States
   {
   Spawn:
   TNT1 A 0;
   TRAC B 0 A_jumpif(GetCvar("GFX_TracerDetail") == 2,"TracerLoop");
   TRAC A 0 A_jumpif(GetCvar("GFX_TracerDetail") == 1,"TracerLoop");
   TNT1 A 0;
   goto TracerLoop;
   
   TracerLoop:
   "####" "#" 1 Bright;
   loop;
   
   Death:
   TNT1 A 0 A_SetScale(1.0);
   TNT1 A 0 { bFLATSPRITE = False; }
   MISL B 8 Bright;
   MISL C 6 Bright;
   MISL D 4 Bright;
   Stop;
   }
}


here is a picture:
https://drive.google.com/file/d/180qAyJw1En27-GF2nUyuJPKOnmTvhL4J/view?usp=sharing

i tried to see from brutal doom code but it still doesn't work.
is it a model property?
User avatar
GGianpy
 
Joined: 11 Mar 2020
Location: Italy
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed

Re: 3D Model don't rotate

Postby GGianpy » Tue Oct 13, 2020 5:57 am

ok, i found out for myself that i had to add the flag "PITCHFROMMOMENTUM" in modeldef.
User avatar
GGianpy
 
Joined: 11 Mar 2020
Location: Italy
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests