Gamestudio Links
Zorro Links
Newest Posts
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, VoroneTZ, 1 invisible), 1,578 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Camera problems #242507
12/23/08 18:38
12/23/08 18:38
Joined: Apr 2007
Posts: 67
suriname0 Offline OP
Junior Member
suriname0  Offline OP
Junior Member

Joined: Apr 2007
Posts: 67
Hello,

Im programing in SED (using C-script) and I've been trying to c_move the camera:

---
camera.pan = hovercraft.pan - 90;
camera.tilt = hovercraft.tilt;
camera.roll = hovercraft.roll;
camera.z = hovercraft.z;
camera.y = hovercraft.y;
camera.x = hovercraft.x;
c_move(camera, vector(-150, 0, 75), nullvector, ignore_models);
---

The c_move generates an error. I know the c_move line itself is sound, because when I put in "hovercraft" instead of "camera" it moves just like the camera should.

Does this mean that I can't c_move the camera? Basically what I am trying to do is get a 3rd person view for this hovercraft, and my solution was to set the camera at the hovercraft, and then move the camera back so the player can see the vehicle. How should I do this? Can I still use c_move for my third person view, or will I have to use geometry?

Any help would be appreciated, thanks.

Re: Camera problems [Re: suriname0] #242512
12/23/08 19:27
12/23/08 19:27
Joined: Feb 2006
Posts: 52
C
carlpa Offline
Junior Member
carlpa  Offline
Junior Member
C

Joined: Feb 2006
Posts: 52
i am certainly not an expert. I believe that camera is a view and c_move requires an entity. The instruction seems to work because c_move uses a pointer which merely indicates a memory location. Of course, I could be wrong, would not be the first time.


Researcher & clinician. A6, A7, & A8
First computer a Commodore Pet
Re: Camera problems [Re: suriname0] #242513
12/23/08 19:50
12/23/08 19:50
Joined: Feb 2008
Posts: 337
V
Vadim647 Offline
Senior Member
Vadim647  Offline
Senior Member
V

Joined: Feb 2008
Posts: 337
..::Your code. Feel happy::..
//at start of script, define a vector "tempvec"
Code:
vec_set(camera.pan,vector(hovercraft.pan-90,hovercraft.tilt,hovercraft.roll) );
vec_set(tempvec,vector(-150,0,75));
vec_rotate(tempvec,camera.pan );
vec_add(tempvec,hovercraft.x);
vec_set(camera.x,tempvec);


Re: Camera problems [Re: Vadim647] #242527
12/23/08 21:40
12/23/08 21:40
Joined: Apr 2007
Posts: 67
suriname0 Offline OP
Junior Member
suriname0  Offline OP
Junior Member

Joined: Apr 2007
Posts: 67
That works perfectly, thanks alot.


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