Crystal Space
Welcome,
Guest
. Please
login
or
register
.
May 24, 2013, 09:06:20 pm
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
9224
Posts in
2230
Topics by
5389
Members
Latest Member:
Sandradhernandez
Crystal Space
Crystal Space Development
Support
Get position of camera in simple2 application
« previous
next »
Pages:
[
1
]
Author
Topic: Get position of camera in simple2 application (Read 3730 times)
ivanguy
Newbie
Posts: 10
Get position of camera in simple2 application
«
on:
October 23, 2005, 01:16:09 am »
Hello,
I customize simple2 app now.
How can i get camera coordinates in ProcessFrame() procedure?
This will need for iLight->SetCenter proc.
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Get position of camera in simple2 application
«
Reply #1 on:
October 23, 2005, 09:27:11 am »
Quote from: ivanguy on October 23, 2005, 01:16:09 am
Hello,
I customize simple2 app now.
How can i get camera coordinates in ProcessFrame() procedure?
This will need for iLight->SetCenter proc.
view->GetCamera ()->GetTransform ().GetOrigin()
Greetings,
Logged
ivanguy
Newbie
Posts: 10
Re: Get position of camera in simple2 application
«
Reply #2 on:
October 24, 2005, 05:02:59 am »
Ok, thanks.
I add this code, seems it works, but the dynamic light dont move!
----In this code i create the light:
light = engine->CreateLight("farcamera", csVector3(-1, 5, 30), 10, csColor(1, 1, 1),CS_LIGHT_DYNAMICTYPE_DYNAMIC);
ll->Add (light);
----This code try to move the light:
iLight* mylight=engine->FindLight("farcamera");
mylight->SetCenter( view->GetCamera ()->GetTransform ().GetOrigin());
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Get position of camera in simple2 application
«
Reply #3 on:
October 24, 2005, 05:23:31 am »
After moving the light you must call light->Setup(). Due to a bug in CS you even must call it twice.
Greetings,
Logged
ivanguy
Newbie
Posts: 10
Re: Get position of camera in simple2 application
«
Reply #4 on:
October 25, 2005, 01:48:21 am »
Yes, it works, thank you.
I develop the metro sim (for fun).
http://redsky-studio.com/BLOG/
There is one big tunnel. This is good idea to make the tunnel from sectors.
But where i can take examples for sector creation? (I do map from program code)
Logged
deckerego
Full Member
Posts: 149
Re: Get position of camera in simple2 application
«
Reply #5 on:
October 25, 2005, 03:47:30 am »
You might want to take a look at walktest - there's an option that will create an endless maze based on sectors. Sounds right up your alley.
Logged
ivanguy
Newbie
Posts: 10
Re: Get position of camera in simple2 application
«
Reply #6 on:
October 28, 2005, 02:41:56 am »
Ok, i can create the portals and sectors now, thanks.
I create big tunnel (0-20000 Z) from sectors (length is 70 Z).
It is VERY SLOW. What should i do?
Logged
deckerego
Full Member
Posts: 149
Re: Get position of camera in simple2 application
«
Reply #7 on:
October 28, 2005, 03:04:46 am »
You might want to use visability culling, clipping a far plane or implementing fog if things are getting too long. If you're using hardware rendering on just a tunnel, tho, you should be largely okay.
Logged
ivanguy
Newbie
Posts: 10
Re: Get position of camera in simple2 application
«
Reply #8 on:
October 29, 2005, 12:37:04 am »
Where can i find this samples or docs?
Logged
ivanguy
Newbie
Posts: 10
Re: Get position of camera in simple2 application
«
Reply #9 on:
October 29, 2005, 01:03:45 am »
Ok, i find this :
iCamera->SetFarPlane from walkcmd.cpp
csPlane3 farplane(0,0,-1,distance);
Sys->view->GetCamera()->SetFarPlane(&farplane);
.
Logged
ivanguy
Newbie
Posts: 10
Re: Get position of camera in simple2 application
«
Reply #10 on:
October 31, 2005, 02:49:34 am »
Please tell me, where i can find samples for create:
- bump-mapping textures
- textures with shader
- Is CS support directional lights?
- Where the easy way to create models?
Thank you for your answers.
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Crystal Space Development
-----------------------------
=> General Crystal Space Discussion
=> Support
-----------------------------
Crystal Space Project Development
-----------------------------
=> Feature Requests
=> Plugins
=> Bug Reports
-----------------------------
Crystal Space Development
-----------------------------
=> Game Content Creation
-----------------------------
Miscellaneous
-----------------------------
=> Article/Tutorial Requests
=> Article/Tutorial Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Development Discussion
-----------------------------
Crystal Space Projects
-----------------------------
=> Project Discussion
=> WIP Projects
=> Finished Projects
-----------------------------
Associate Projects
-----------------------------
=> CEL Discussion
=> Crystal Core Discussion
=> CrystalBlend Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Google Summer of Code
-----------------------------
Associate Projects
-----------------------------
=> Apricot (Open Game)
=> Ares Project
Loading...