Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Ermi

3D Missiles and Pitches

Recommended Posts

Ive come across a issue...
I have a gun that fires a 3D projectile with PITCHFROMMOMENTUM enabled, this works as intended.
Now i have that same fired projectile fire ANOTHER missile with a_spawnprojectile with a SPEED of 0, however the second projectile does not inherit the first projectiles pitch. it simply faces downwards. Any ideas?

Edited by Ermi

Share this post


Link to post

Every actor has a "pitch" variable, and A_SpawnProjectile has a "pitch" parameter, so try writing literally "pitch" into the "pitch" parameter field to refer to the first projectile's pitch as the value to set the second projectile's pitch to.

Share this post


Link to post

Sol lik

9 minutes ago, scifista42 said:

...

so like this? 
A_SPAWNPROJECTILE("GATLING_CANNON_projectile",0,0,0,0 ,PITCH,0) ???

this still makes the projetile face downwards... Here is the whole code

Spoiler

ACTOR GATLING_CANNON_projectile_SPAWNER
{
+NOGRAVITY
+NOCLIP
+THRUACTORS
+BRIGHT

PROJECTILE
RENDERSTYLE ADD
SPEED 40

STATES
{
SPAWN:
TNT1 A 0
TNT1 A 0 A_SPAWNPROJECTILE("GATLING_CANNON_projectile",0,0,0,0 ,PITCH)
STOP
}}

 

 

 

 

 

 

SECOND PROJECTILE
ACTOR GATLING_CANNON_projectile
{
+NOGRAVITY
+NOCLIP
+THRUACTORS
//+BRIGHT

PROJECTILE
//RENDERSTYLE ADD
SPEED 12

STATES
{
SPAWN:
TNT1 A 0
1024 A 1
LOOP
}}

Sorry for caps...

Share this post


Link to post
1 minute ago, scifista42 said:

You have to use CMF_AIMDIRECTION flag. See https://zdoom.org/wiki/A_SpawnProjectile

yes sir, i tried that already. the 3d model however does not inherit the first projectiles pitch, its stuck at a horizontal angle.

 

the first projectile works perfectly fine, the direction of the model is correct.

Share this post


Link to post

With all that you mentioned above applied, the issue still occures.
Here is a video demonstrating the problem... you will notice that the projectiles on screen (2nd missile) does not inherit the players pitch which technically is the first projectiles pitch. the projectile sseem to be stuck on a horrizontal plane

 the second projectile when fired from another projectile does not seem to inherit any kind of pitch

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×