3 registered members (AndrewAMD, VoroneTZ, 1 invisible),
1,578
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Camera problems
#242507
12/23/08 18:38
12/23/08 18:38
|
Joined: Apr 2007
Posts: 67
suriname0
OP
Junior Member
|
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
carlpa
Junior Member
|
Junior Member
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
Vadim647
Senior Member
|
Senior Member
Joined: Feb 2008
Posts: 337
|
..::Your code. Feel happy::.. //at start of script, define a vector "tempvec"
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);
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|