Frictional Games Forum (read-only)
SOMA Third Person Camera Control - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: SOMA (https://www.frictionalgames.com/forum/forum-55.html)
+--- Forum: User created content (https://www.frictionalgames.com/forum/forum-79.html)
+---- Forum: Development (https://www.frictionalgames.com/forum/forum-82.html)
+---- Thread: SOMA Third Person Camera Control (/thread-32991.html)



SOMA Third Person Camera Control - Abion47 - 11-30-2015

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.


RE: SOMA Third Person Camera Control - 1minus1is0 - 11-30-2015

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.


RE: SOMA Third Person Camera Control - Abion47 - 11-30-2015

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.)


RE: SOMA Third Person Camera Control - Kanthos - 11-30-2015

This. Is. Awesome.

Great idea and so cool you made that.

Greets Smile


RE: SOMA Third Person Camera Control - Romulator - 11-30-2015

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.


RE: SOMA Third Person Camera Control - MatiCekuriel - 12-03-2015

Looking forward for this, I started a mod inspired by Silent Hill, it would be so much better with this Big Grin


RE: SOMA Third Person Camera Control - Abion47 - 12-05-2015

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






RE: SOMA Third Person Camera Control - Myster Stranger - 12-14-2015

(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


RE: SOMA Third Person Camera Control - Abion47 - 12-14-2015

(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.