Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/01/26 16:40
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (Quad, TipmyPip, Grant), 5,429 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 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 | 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