3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: How to make camera shake while walking and how to do sprinting(FPS camera)?  (Read 209 times)

« on: June 17, 2014, 08:54:27 AM »
You know what i want
Alright from the title you know what i want , so is there any script to do so ? Please help fast. Or you can give me a demo project.
« Reply #1 on: June 17, 2014, 04:00:20 PM »
1 - go to Google search and enter site:www.3DRAD.com camera shake

--Mike
« Reply #2 on: June 18, 2014, 03:15:11 AM »
I am too kind: FPS Camera Bobbing?
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #3 on: June 18, 2014, 03:55:53 AM »
Thank you so much , but it just moving up and down , i want to shake it a little bit , left and a little bit right too , can you help me with that.. ?
« Reply #4 on: June 18, 2014, 05:52:30 PM »
ahahahahaha... now you see why i gave the answer i gave  ;D  ;D  ;D


--Mike
« Reply #5 on: June 19, 2014, 03:44:30 AM »
Oh, I am way too kind...  ::)
You're lucky I love math.

Check the topic I linked to earlier again.

I improved it a bit too, it should be smoother now.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #6 on: June 19, 2014, 06:52:47 AM »
Oh, I am way too kind...  ::)
You're lucky I love math.

Check the topic I linked to earlier again.

I improved it a bit too, it should be smoother now.

Thank you sir for your help , but i want to make that screen shake a little bit more while running , can you help and also please help me in making a FPS game i m noob at all in 3D rad email me - [email protected] .

Thanks for your help.
« Reply #7 on: June 20, 2014, 03:06:41 AM »
...but i want to make that screen shake a little bit more while running...

Now I'm not sure what you mean. The camera is shaking now, isn't it?

...can you help and also please help me in making a FPS game...

Well, no, I won't help you make a game. However, if you have any specific technical questions and you ask them on this forum, I will probably help you.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #8 on: June 20, 2014, 03:24:05 AM »
Buddy but you said that forum is shutting down and also the screen is shaking but while i run/sprint i want that shake it a little bit more and also when i import my fps hand with a gun into 3d rad the models appear much darker than it was in sketchup , any help?
« Reply #9 on: June 21, 2014, 02:38:01 AM »
and also can you please tell me how to import gamebanana skins to 3d rad?
« Reply #10 on: June 21, 2014, 03:33:34 AM »
Buddy but you said that forum is shutting down...

Yep, but pretty much all of us are moving to another forum: http://www.3dfoundry.tk/forum/index.php

and also the screen is shaking but while i run/sprint i want that shake it a little bit more...

Ah, I see. Not very difficult, all you have to do is change the amplitude. But implementing this will depend on your project. Because how is the sprinting 'managed'? What button? Is it 'hold' or 'press once'? Does the player have a limited about of sprint? I can only make it for you if it's one button, hold and endless sprint.

also when i import my fps hand with a gun into 3d rad the models appear much darker than it was in sketchup , any help?

Yeah, I remember this problem. This is simply due to a difference in rendering. You can either make your textures lighter, or set the shader type to normal mapped, if you have a normal map that is, otherwise it's a waste of performance.

and also can you please tell me how to import gamebanana skins to 3d rad?

I don't know what a 'gamebanana skin' is.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #11 on: June 21, 2014, 04:26:53 AM »
Sprinting is press once , hold and endless sprint and thankyou for another forum link , can you give me your email so that i can talk to you whenever i want(when you online) and i dont understand what to do with darker models problem , can you explain properly , and gamebanana is website which provides skins for games like counter strike , i wannted to import counter strike skins to 3d rad .
« Reply #12 on: June 22, 2014, 04:43:43 AM »
Sprinting is press once , hold and endless sprint

Okay.

Simply replace the script with this one:
Code: [Select]
///Local to Paren function
void Local2Parent(int parent, int child, Vector3 rot, Vector3 loc)
{
   Vector3 pLoc, oLoc; iObjectLocation(parent,pLoc); Quaternion pRot, oRot, mRot; iObjectOrientation(parent,pRot); iVectorRotate(oLoc,loc,pRot); iObjectLocationSet(child,pLoc+oLoc); iQuaternionFromEulerAngles(oRot,rot.x,rot.y,rot.z,"xyz"); iQuaternionMultiply(mRot,oRot,pRot); iObjectOrientationSet(child,mRot);
}

///Variables
float timer = 0, x = 0, y = 0, xRef, yRef;
float tAmplitude = 1, amplitude = 1, tSpeed = 10, speed = 10;
bool once;
void Main()
{
   ///Sprint
   if (iKeyDown(iKeyCode("DIK_LSHIFT")))
   {
      tAmplitude = 2;
      tSpeed = 15;
   }
   else
   {
      tAmplitude = 1;
      tSpeed = 10;
   }

   ///Smooth Effect.
   if (tAmplitude < amplitude) amplitude -= 0.05;
   else amplitude += 0.05;

   if (tSpeed < speed) speed -= 0.05;
   else speed += 0.2;

   ///Let the timer 'time' when the character is moving
   if (IN_0 > 2.0)
   {
      timer += speed;
      once = true;

      ///Create the offset effect
      x = amplitude*0.5*iFloatSin(timer);
      y = amplitude*iFloatSin(0.5*timer);
   }

   ///If you stop moving, set offset back to zero
   else
   {
      if (once)
      {
         xRef = x;
         yRef = y;
         once = false;
      }
      x = iFloatTendTo(x, xRef, 0, 0.1, 2);
      y = iFloatTendTo(y, yRef, 0, 0.1, 2);
      timer = 0;
   }

   ///Wrap Timer
   if (timer >= 720) timer -= 720;

   ///Attach cam to character
   Local2Parent(OBJ_0,OBJ_22,Vector3(x,y,0),Vector3(0,0,0));
}

...can you give me your email so that i can talk to you whenever i want(when you online)...

My email is visible in my profile, but I would rather have you PM me here on the forum or the new one. I don't like email conversations much.

...and i dont understand what to do with darker models problem , can you explain properly...

I explained properly. Short recap: Sketchup renders textures lighter than 3D Rad. So, make the textures lighter if you want them lighter.

...and gamebanana is website which provides skins for games like counter strike , i wannted to import counter strike skins to 3d rad

I'm assuming that these skins are just textures. Then all you have to do is create a model with that/these textures and import it into 3D Rad.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #13 on: June 22, 2014, 07:31:25 AM »
To make the skinmesh lighter use the 0002_pp_smooth_glossy shader.
--Sam
Pages: [1]