Gamestudio Links
Zorro Links
Newest Posts
How to Change Multiplier
by vicknick. 06/02/23 03:27
How to buy tomorrow at open?
by vicknick. 06/02/23 03:19
Adding Position to Current Trade
by vicknick. 06/02/23 03:09
Unable to change multiplier of contract
by vicknick. 05/30/23 06:56
Wrong Definition of Sharpe Ratio in Zorro?
by vicknick. 05/29/23 06:32
Backtest strategy on bitcoin/crypto
by JamesHH. 05/26/23 04:36
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (vicknick, 7th_zorro, Quad), 1,030 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
BInnacle, androsa, XquicksnowX, danishinvest, Trail
18942 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Help making some code #334060
07/20/10 23:18
07/20/10 23:18
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 795
U.S.A. Michigan
Hey 3DGS community, I am in need of some assistance. I am trying to make a camera bobbing code for my FPS game. I would like to have the camera bob up and down while slightly swaying from left to right (Representing each foot step). I kow this uses a bunch of trigonometry and I am a bit young to even know this, therefore, I dont even know where to begin. Is there any way you can help me? Also, I would like the camera to always look towards the aiming reticule since I have my reticule made so the gun and reticule have to "catch up" with the camera. I really hate having to ask others to do the work for me, but I really dont even know where to begin on this one frown

Re: Help making some code [Re: exile] #334061
07/20/10 23:25
07/20/10 23:25
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
I think there maybe a camera bob code in an old AUM's can't remember which one though.
Ask George in the AUM forum he maybe able to tell you or someone else will in that foorum.
Good luck.


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: Help making some code [Re: Nidhogg] #334091
07/21/10 07:45
07/21/10 07:45
Joined: Jul 2010
Posts: 129
B
bk9iq Offline
Member
bk9iq  Offline
Member
B

Joined: Jul 2010
Posts: 129
This is a question in AUM 68 ... might help


Quote:
Q: I'd like to have a camera that swings out a bit, just like a boat riding a small wave.

A: Here's an example.



function swinging_camera_startup()

{

var temp_cam = 0;

while (1)

{

temp_cam += 3 * time_step; // 3 = speed

camera.z += 0.5 * sin(temp_cam); // 0.5 = amplitude, replace camera.z with camera.x or camera.y if you need to

wait (1);

}

}


Re: Help making some code [Re: bk9iq] #334161
07/21/10 16:36
07/21/10 16:36
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
i found a script in AUM 31, a john wayne camera bob. take a look at it. it's in the questions section.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: Help making some code [Re: Blink] #334191
07/21/10 18:36
07/21/10 18:36
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 795
U.S.A. Michigan
Thanks again for all the help guys, but now I have a new problem... I keep getting a "Number Syntax" error at the "type = "hk416.mdl";" line. Why is that??? Here is the code...

entity weapon_cur // will appear on screen
{
type = "hk416.mdl";
layer = 10;
view = camera;
x = 25;
y = -10;
z = -10;
}

Re: Help making some code [Re: exile] #334265
07/22/10 07:54
07/22/10 07:54
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 795
U.S.A. Michigan
Never mind, I fixed it. Turns out its much easier to make the weapons world entities instead of view entities. LOL.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1