Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SOMA Third Person Camera Control
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#1
SOMA Third Person Camera Control

Got into talks with oneminusone over making a Silent-Hill-style camera setup in SOMA, so I decided to see how possible it was. Turns out, it was a lot easier than I thought it would be.





I based the camera-switching mechanic on the bullet-loading segment of Phi, which incidentally ended up being only about 7-8 lines of code (if that) to get the camera part actually functional. Oddly enough, the actual player avatar is going to be much harder.

For starters, rotating an entity in SOMA is bizarrely difficult. As it turns out, rotating an entity can only be done by setting the rotation parameters of a transformation matrix, which by itself wouldn't be that huge of a deal except the creation and management of a matrix is also really difficult to figure out.

Ultimately though, I ended up using the cLuxAgent class rather than the iLuxEntity class, because unlike the other entity class types, the Agent class has an iCharacterBody field which does support simple rotation. And to be fair, when you're making a complex character entity, it should be an Agent entity anyway.

In any case, you can see from the video that this system is far from being suitable for a complete product just yet, but by itself the fact that HPL3 allows for this sort of stuff makes me excited to see what future mods come up with.
11-30-2015, 05:58 AM
Find
1minus1is0 Offline
Member

Posts: 56
Threads: 3
Joined: Sep 2015
Reputation: 4
#2
RE: SOMA Third Person Camera Control

This is so very very cool. Makes a mind race to think up all potential applications, of which off the top of head there are several.
11-30-2015, 07:12 AM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#3
RE: SOMA Third Person Camera Control

Here's a bit of an update. Decided to look into the collision problem a bit more before I headed off to bed, and ended up finding an unexpected fairly elegant solution.





So with that, I think the only thing this would really need to be put into a mod is some custom content. Like, for example, a character model with idle, walk, and perhaps walk_backward animations. (Unless of course you like the perpetually walking businessman look.)
11-30-2015, 10:50 AM
Find
Kanthos Offline
Junior Member

Posts: 48
Threads: 7
Joined: Oct 2015
Reputation: 1
#4
RE: SOMA Third Person Camera Control

This. Is. Awesome.

Great idea and so cool you made that.

Greets Smile
11-30-2015, 02:35 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#5
RE: SOMA Third Person Camera Control

Thanks for this! In a mod where I present puzzles to the player to solve (similar to Portal), I was going to have a point in time where the player has to control a monster or someone to a particular area while avoiding contact with certain entities.

I'm glad that it can be done though - that's the best relief xD should be great fun to tackle such a task when the point comes around.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
11-30-2015, 03:53 PM
Find
MatiCekuriel Offline
Member

Posts: 79
Threads: 11
Joined: Aug 2012
Reputation: 3
#6
RE: SOMA Third Person Camera Control

Looking forward for this, I started a mod inspired by Silent Hill, it would be so much better with this Big Grin
12-03-2015, 10:40 AM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#7
RE: SOMA Third Person Camera Control

Final update (for now) on the camera control. I try out the system in a level more closely resembling a mod-ready level layout.



12-05-2015, 06:20 AM
Find
Myster Stranger Offline
Junior Member

Posts: 14
Threads: 3
Joined: Oct 2015
Reputation: 0
#8
RE: SOMA Third Person Camera Control

(12-05-2015, 06:20 AM)Abion47 Wrote: Final update (for now) on the camera control. I try out the system in a level more closely resembling a mod-ready level layout.




Interesting approach, I assume the monsters all try chasing the camera, so you may require extensive rescripting of the behavioral AI, but I am loving the idea of making third person Soma mods... considering the death animations provided by the old Penumbra assets, you could conceivably play as a monster hunting other creatures down, circumventing the AI issue entirely... would you mind posting your code when your done? This is kind of awesome, Big Grin
12-14-2015, 07:47 AM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#9
RE: SOMA Third Person Camera Control

(12-14-2015, 07:47 AM)Myster Stranger Wrote: Interesting approach, I assume the monsters all try chasing the camera, so you may require extensive rescripting of the behavioral AI, but I am loving the idea of making third person Soma mods... considering the death animations provided by the old Penumbra assets, you could conceivably play as a monster hunting other creatures down, circumventing the AI issue entirely... would you mind posting your code when your done? This is kind of awesome, Big Grin

I've actually since come up with an approach that treats the character as the player, and as such has the monsters chasing it instead of the camera, letting you use any of the existing AI types. That being said, the existing AI types were designed for first-person in mind, so I can't say whether they would require rescripting anyway.
(This post was last modified: 12-14-2015, 08:11 AM by Abion47.)
12-14-2015, 08:11 AM
Find




Users browsing this thread: 2 Guest(s)