jorgeas80
Junior Member
Posts: 21
Threads: 7
Joined: Jan 2014
Reputation:
0
|
Do the lights that the player can carry in the game have a defined position?
Hello,
The player can carry a glowstick, or a flashlight, to get some light in dark scenarios. I know the light sources that are present in the maps have a defined (X, Y, Z) position, like any other object. But, what about the glowstick or the flashlight? do they have a defined position when the player uses them? Maybe the player hands position (which I guess is updated when the player is moving)?
Many thanks in advance.
|
|
03-03-2014, 01:11 PM |
|
Deadon
Member
Posts: 64
Threads: 5
Joined: Feb 2014
Reputation:
1
|
RE: Do the lights that the player can carry in the game have a defined position?
well, with 131111 you can check the player position, that's where the light is so....
2 Mappers are definitely better than one.
|
|
03-04-2014, 03:05 AM |
|
jorgeas80
Junior Member
Posts: 21
Threads: 7
Joined: Jan 2014
Reputation:
0
|
RE: Do the lights that the player can carry in the game have a defined position?
(03-04-2014, 03:05 AM)Deadon Wrote: well, with 131111 you can check the player position, that's where the light is so....
Sorry for my ignorance, but, what is 131111?
|
|
03-04-2014, 09:47 AM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Do the lights that the player can carry in the game have a defined position?
Deadon, it's using HPL1 - Which is for Penumbra.
I cannot help much here, because I don't use Penumbra or HPL1, but I believe if anything has a light source on it as an entity, there would be a defined area for it relative to it's model's xyz = 0 co-ordinates, not the player's model.
I would try to confirm this, but it would require me getting Penumbra using... unnecessary tactics, which I will not mention here. I am only saying this because from Amnesia's aspect, examining every model, there is a light source which will illuminate a general area. On Amnesia's lantern itself, there is a light source in front of it by a few z co-ordinates and illuminates the surrounding area of the player.
Discord: Romulator#0001
(This post was last modified: 03-04-2014, 11:18 AM by Romulator.)
|
|
03-04-2014, 11:15 AM |
|
jorgeas80
Junior Member
Posts: 21
Threads: 7
Joined: Jan 2014
Reputation:
0
|
RE: Do the lights that the player can carry in the game have a defined position?
(03-04-2014, 11:15 AM)Romulator Wrote: Deadon, it's using HPL1 - Which is for Penumbra.
I cannot help much here, because I don't use Penumbra or HPL1, but I believe if anything has a light source on it as an entity, there would be a defined area for it relative to it's model's xyz = 0 co-ordinates, not the player's model.
I would try to confirm this, but it would require me getting Penumbra using... unnecessary tactics, which I will not mention here. I am only saying this because from Amnesia's aspect, examining every model, there is a light source which will illuminate a general area. On Amnesia's lantern itself, there is a light source in front of it by a few z co-ordinates and illuminates the surrounding area of the player.
That makes total sense. The flashlight is just a 3D entity with the shape of a flashlight with a light source on it.
Ok, I'm learning a lot. Now, just need to know where, in the code, do those "moving" lights update their position. I guess it's the same code where the player (who carries the flashlight) update its attributes.
Thanks!
|
|
03-04-2014, 12:52 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Do the lights that the player can carry in the game have a defined position?
I THINK it is more whenever the player moves, the light source (the light itself on the flashlight or glowstick) does not move. It stays relative to its co-ordinates defined by the model of either the flashlight or glowstick, but the MODEL of the source moves.
For example's sake; Let's say that the flashlight is 1m (Y-Axis) off the ground, and the light itself is 0.3 cm away from the torch (Z-Axis). When the player steps, the torch will drop 0.3cm (Y-Axis) to simulate a step, as will the light, but that will stay relative to the model in the Z-Axis.
Sorry if that doesn't make much sense..
Discord: Romulator#0001
(This post was last modified: 03-04-2014, 01:16 PM by Romulator.)
|
|
03-04-2014, 01:15 PM |
|
jorgeas80
Junior Member
Posts: 21
Threads: 7
Joined: Jan 2014
Reputation:
0
|
RE: Do the lights that the player can carry in the game have a defined position?
No, it's ok. I get it. There are 2 different concepts here:
- The position of an object (example: the flashlight object) in the World
- The position of an object (example: the light source in the torch) in relation with another object that contains it (example: the flash light itself)
So, when the player moves, the flashlight also moves with him (because he's holding it), but the position of the light source doesn't change its coordinates, because is still in the same position in relation with the flashlight.
That could be the reason for the 2 set of coordinates that every single iLight3D object contains (LocalPosition and WorldPosition). Does it make sense?
Many thanks again!
|
|
03-04-2014, 01:28 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Do the lights that the player can carry in the game have a defined position?
Well, I am only speculating, because I have never played Penumbra, I am going off Amnesia experience here
But it seems to make sense, and if you can accomplish what you needed, I'm glad I could help!
Good luck on your project(s)!
Discord: Romulator#0001
|
|
03-04-2014, 01:38 PM |
|
jorgeas80
Junior Member
Posts: 21
Threads: 7
Joined: Jan 2014
Reputation:
0
|
RE: Do the lights that the player can carry in the game have a defined position?
Sure thing! Many thanks for your help
|
|
03-04-2014, 02:18 PM |
|
|