Announcement

Collapse
No announcement yet.

How does a projectile Spin?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    When I think about it you should just be able to set rotationrate in the defaultproperties

    defaultproperties
    {
    rotationrate = (5,5,5)
    }

    Will cause it to rotate constantly (with no tick) form spawn...

    Comment


      #17
      bFixedRotationDir=True

      Comment


        #18
        I'm still having trouble i'll post the code

        Code:
        //==============================================
        //BricklauncherHammerprojectile
        //==============================================
        class bricklauncherprojectiletwo extends projectile;
        
        #exec OBJ LOAD FILE=BrickLauncher.utx
        
        simulated function PostBeginPlay()
        {
            Super.PostBeginPlay();
        
            if (Role == ROLE_Authority)
            {
                Velocity = Vector(Rotation) * Speed;
            }
        }
        
        defaultproperties
        {
           DrawScale3D=(X=1,Y=1,Z=1)
           Physics=PHYS_Projectile
           bFixedRotationDir=true
           DesiredRotation=(Pitch=12000,Yaw=5666,Roll=2334)
           Rotation=(Pitch=0,Yaw=5,Roll=0)
           Rotationrate=(Pitch=0,Yaw=5,Roll=0)
           DrawType=DT_StaticMesh
           StaticMesh=StaticMesh'BrickLauncher.Hammerprj'
           MaxSpeed=2750
           Speed=2750
           Damage=30
           LifeSpan=18
        }

        Comment


          #19
          You copied that off of xWeapons.Grenade, right? I can't find fault with it. Does it just fall to the ground?

          Are you sure Rotation points in the firing direction? What's the code in which it is spawned?

          Comment


            #20
            Actually no i didnt copy it from the grenade, I coded it. Making somthing like this isn't exactly hard. Anyway it doesn't fall it goes forward, but it just doesn't spin. I've got the weapon in a working state now im just decorating it to make it look cool.

            Edit///////Is the colision data the only thing thats spinning i don't understand why it's not working.

            Comment


              #21
              Try upping the number in spin, it might in fact be spinning very slowly

              Comment


                #22
                Right, rotation rate is a weird one. Numbers should be on the area of about 50,000 to give a nice spin.

                Comment


                  #23
                  I was able to make the hammer spin which is really cool but now the collision data isn't working once i get this done ill balance the weapon and release it so this is the last problem. what is an average size for collision size?

                  Here is what i have now:

                  CollisionHeight=10
                  CollisionRadius=3

                  Comment

                  Working...
                  X