|
|
|
 |
Cry-Spify  |
Crytek Staff Member | Member since: 20.07.2011, 10:22 | Posts: 489 | Location: Frankfurt am Main |
Likes: 1 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 05.06.2012, 09:36 |
No, probably a light shaft won't be visible but you can fake that as well.
On top of everything, you could beam a GeomEntity to the same position where you beam the light. This GeomEntity should point to beam.cgf which should be by default in the build (\Game\objects\Lights\beam.cgf). If you can't find it, go to \Game\Objects.pak, open it with winrar or winzip and extract the Lights folder. There you can find beam.cgf and the material for it...
At this point you are pretty much set.
|
|
|
|
|
|
|
|
 |
VokusX  |
Experienced Modder | Member since: 18.08.2011, 15:08 | Posts: 514 | Location: Canada |
Likes: 0 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 05.06.2012, 21:11 |
Quote: [1:49:53 PM] fedayk1ntr: Join the Dark side [1:50:04 PM} themodman101: You may have cookies, but we have all the milk.
|
|
|
|
|
|
|
 |
TheLegend  |
Beginner | Member since: 30.04.2011, 03:14 | Posts: 39 |
Likes: 0 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 17.07.2012, 10:22 |
Hey, I've run into a similar problem. I'm trying to get the Flashlight to match the camera's position exactly, Including the Pitch. In concept: When you look up, so does the light. When you look down, etc. I've gotten close, but instead of going up (when looking up) it goes down and vice-versa. I've attached that part of the FG below.
|
|
|
|
|
|
|
 |
Cry-Spify  |
Crytek Staff Member | Member since: 20.07.2011, 10:22 | Posts: 489 | Location: Frankfurt am Main |
Likes: 1 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 17.07.2012, 11:03 |
Try to take the pitch and multiply it (Math:Mul) with -1(negative one) then get the result into that Vec3:ToVec.
|
|
|
|
|
|
|
 |
TheLegend  |
Beginner | Member since: 30.04.2011, 03:14 | Posts: 39 |
Likes: 0 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 17.07.2012, 11:20 |
Works perfect now. Thank you, Sir!
|
|
|
|
|
|
|
 |
Cry-Spify  |
Crytek Staff Member | Member since: 20.07.2011, 10:22 | Posts: 489 | Location: Frankfurt am Main |
Likes: 1 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 17.07.2012, 11:23 |
You're welcome! I should change my name into Sir-Spify
|
|
|
|
|
|
|
 |
TheLegend  |
Beginner | Member since: 30.04.2011, 03:14 | Posts: 39 |
Likes: 0 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 17.07.2012, 11:36 |
Cry-Sir-Spify. Just saying.
|
|
|
|
|
|
|
ilovegamemaking  |
Beginner | Member since: 18.10.2011, 19:32 | Posts: 92 | Location: germany |
Likes: 0 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 02.08.2012, 19:41 |
hi, i'am sorry to answer to an already solved topic but i found a better not so "fps dropping" way:
|
|
|
|
|
|
|
BennzX  |
Beginner | Member since: 09.06.2012, 01:21 | Posts: 81 | Location: Germany |
Likes: 0 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 03.08.2012, 00:38 |
Taking to the first flowgraph - if you're going to prone or crouching, the light will stay at the same point on height-axis (z). So, if you're taking the camera height instead of 0.8 m it would be more nice.
|
|
|
|
|
|
|
ebagdrof  |
Beginner | Member since: 27.08.2011, 10:06 | Posts: 70 |
Likes: 0 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 03.08.2012, 01:25 |
Quote by ilovegamemaking: hi, i'am sorry to answer to an already solved topic but i found a better not so "fps dropping" way: How do I assign my flashlight light/entity to these:  I've got it set up fine (I think)  (in the above image my light called "flashlight" selected, thats where I started the flowgraph) Here's a closer version of my light's properties...
|
|
|
|
|
|
|
 |
Cry-Spify  |
Crytek Staff Member | Member since: 20.07.2011, 10:22 | Posts: 489 | Location: Frankfurt am Main |
Likes: 1 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 03.08.2012, 10:26 |
Select the flashlight then go to flowgraph and right click on Choose Entity (red field) and then click on 'Assign selected entity' (or 'Assign graph entity' - it doesn't matter - I just prefer the first one).
|
|
|
|
|
|
|
ilovegamemaking  |
Beginner | Member since: 18.10.2011, 19:32 | Posts: 92 | Location: germany |
Likes: 0 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 03.08.2012, 10:36 |
@BennzX i'am sorry i dont know what you mean, i have tested it and the light follows the player exactly
|
|
|
|
|
|
|
BennzX  |
Beginner | Member since: 09.06.2012, 01:21 | Posts: 81 | Location: Germany |
Likes: 0 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 03.08.2012, 13:16 |
I meant the way bevor you created you'r "not so fps-dropping way"  As I've started to create an horrorgame I had some issues while proning trough a little tunnel. Light has always stayed at the upper screen egde. If someone has the same issues - just take the camera's position, from vec3, and take the z-variable from camera's position instead of the math-add +0.8. Much more better.
|
|
|
|
|
|
|
ilovegamemaking  |
Beginner | Member since: 18.10.2011, 19:32 | Posts: 92 | Location: germany |
Likes: 0 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 03.08.2012, 13:20 |
ok good luck with your horrorgame
|
|
|
|
|
|
|
BennzX  |
Beginner | Member since: 09.06.2012, 01:21 | Posts: 81 | Location: Germany |
Likes: 0 |
| |
|
Post Topic: Re: [Free SDK] How to make a 'flashlight' Posted 03.08.2012, 14:07 |
Thank you Tested out your version of the flashlight - it's simple, fast to create and without any issues  Only thing is, I think first version was a bit smoother.
|
|
|
|
|